{"record":{"id":"1370e27a895f5206","repo":"facebook/react","slug":"361","errorCode":"361","errorMessage":"The current renderer does not support test selectors. This error is likely caused by a bug in React. Please file an issue.","messagePattern":"The current renderer does not support test selectors\\. This error is likely caused by a bug in React\\. Please file an issue\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-reconciler/src/ReactFiberConfigWithNoTestSelectors.js","lineNumber":14,"sourceCode":"/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// Renderers that don't support test selectors\n// can re-export everything from this module.\n\nfunction shim(...args: any): empty {\n  throw new Error(\n    'The current renderer does not support test selectors. ' +\n      'This error is likely caused by a bug in React. ' +\n      'Please file an issue.',\n  );\n}\n\n// Test selectors (when unsupported)\nexport const supportsTestSelectors = false;\nexport const findFiberRoot = shim;\nexport const getBoundingRect = shim;\nexport const getTextContent = shim;\nexport const isHiddenSubtree = shim;\nexport const matchAccessibilityRole = shim;\nexport const setFocusIfFocusable = shim;\nexport const setupIntersectionObserver = shim;\n","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-reconciler/src/ReactFiberConfigWithNoTestSelectors.js#L1-L30","documentation":"Test selectors power React's own test-driver APIs (findFiberRoot, getBoundingRect, getTextContent, isHiddenSubtree, matchAccessibilityProperties, focusSubtree). Renderers that don't implement them re-export ReactFiberConfigWithNoTestSelectors, where each is a throwing shim and `supportsTestSelectors = false`. Calling a test-selector API against such a renderer throws this error.","triggerScenarios":"Invoking test-selector functionality — component find/test-driver queries, DevTools element inspection helpers — while the resolved host config re-exports NoTestSelectors (react-native without the selector host config, most custom renderers).","commonSituations":"Running React's internal test-driver or selector-based E2E tooling against custom renderers; forks whose configs never implemented the selector hooks.","solutions":["Run selector-dependent tests against react-dom (jsdom/happy-dom) instead of the custom renderer.","Custom renderer authors: implement the test-selector hooks in your host config if you need selector tooling.","Check `supportsTestSelectors`-style capability before enabling selector-driven test paths."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Probe selector support once before running selector-based tooling\nlet selectorsSupported = false;\ntry {\n  selectorsSupported = typeof rendererTestApi?.findFiberRoot === 'function';\n} catch {}\nif (!selectorsSupported) useDomTestEnvironment();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run selector-dependent E2E tests against react-dom/jsdom","Custom renderer authors: implement or explicitly reject test-selector hooks","Feature-detect selector tooling instead of assuming it exists per renderer"],"tags":["test-selectors","testing","custom-renderer","renderer-capability"],"backgroundTag":"renderer-capability-unsupported","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}