test(render): Basic render function test - validates that users can render components and query rendered elements. Coverage: 77.31% statements, 66.66% branches, 75% functions for render.tsx. Uncovered: rerender, unmount, toJSON methods, root getter error path, debug function.
test(queries/text): Validates getByText with exact:false option for partial text matching - critical for testing dynamic/long text content. Coverage: 100% statements, 100% branches (was 80%), 66.66% functions for text.ts. Covered options parameter branch.
test(queries/role): Validates getByRole name option fallback to text content when accessible name is not set - critical for testing components without explicit accessibility labels. Coverage: 81.1% statements (was 61.41%), 61.11% branches, 66.66% functions for role.ts. Covered text fallback path in matchAccessibleNameIfNeeded.
test(queries/display-value): Validates getByDisplayValue finds TextInput elements by their display value - critical for testing forms where users need to verify input values. Coverage: 97.1% statements (was 78.26%), 85.71% branches, 66.66% functions for display-value.ts. Covered matchDisplayValue function and query logic. Uncovered: error message functions (getMultipleError, getMissingError).
test(queries/placeholder-text): Validates getByPlaceholderText finds TextInput elements by their placeholder text - critical for testing forms where users need to find inputs by placeholder. Coverage: 97.01% statements (was 79.1%), 85.71% branches, 66.66% functions for placeholder-text.ts. Covered matchPlaceholderText function and query logic. Uncovered: error message functions (getMultipleError, getMissingError).
test(queries/label-text): Validates getByLabelText finds elements by their accessibility label - critical for testing accessibility where labels identify interactive elements. Coverage: 96.42% statements (was 87.5%), 100% branches, 50% functions for label-text.ts. Covered queryAllByLabelText function body and query logic. Uncovered: error message functions (getMultipleError, getMissingError).
test(queries/hint-text): Validates getByHintText finds elements by their accessibility hint with exact matching - critical for testing accessibility where hints provide additional context to screen readers. Coverage: 97.93% statements (was 93.81%), 83.33% branches, 66.66% functions for hint-text.ts. Covered getNodeByHintText function with exact option and query logic. Uncovered: error message functions (getMultipleError, getMissingError).
test(queries/test-id): Validates getByTestId with exact:false option for partial testID matching - critical for testing components with dynamic or prefixed testIDs. Coverage: 96.42% statements (was 89.28%), 83.33% branches, 66.66% functions for test-id.ts. Covered matchTestId function with exact option and queryAllByTestId implementation. Uncovered: error message functions (getMultipleError, getMissingError).
test(wait-for): Validates waitFor timeout behavior when expectation never passes - critical error handling users depend on when async conditions fail. Coverage: 55% statements (was 12%), 43.47% branches, 85.71% functions for wait-for.ts. Covered timeout error path and lastError handling. Uncovered: fake timers path, promise-returning expectations, onTimeout callback, timer switching errors.
test(wait-for): Validates waitFor resolves when expectation returns a promise that resolves - critical feature users depend on for async expectations that return promises. Coverage: 64% statements (was 55%), 64.28% branches (was 43.47%), 100% functions for wait-for.ts. Covered promise-returning expectation path, promise resolution handling. Uncovered: fake timers path, onTimeout callback, timer switching errors, type checking.
test(wait-for-element-to-be-removed): Validates error when element is already removed at call time - critical error handling users depend on when misusing the API. Coverage: 61.9% statements (was 9.52%), 66.66% branches, 100% functions for wait-for-element-to-be-removed.ts. Covered isRemoved helper and initial validation error path. Uncovered: wait logic (lines 27-42).
test(render-hook): Validates renderHook with initial props and rerender functionality - critical API users depend on for testing React hooks with props. Coverage: 100% statements (was 5.66%), 85.71% branches, 100% functions for render-hook.tsx. Covered hook rendering, initialProps, rerender with new props. Uncovered: line 41 (options destructuring edge case).
test(fire-event): Validates fireEvent.press invokes event handler on element - critical API users depend on for testing user interactions. Coverage: 77.27% statements (was 33.33%), 53.33% branches, 87.5% functions for fire-event.ts. Covered main fireEvent function, findEventHandler traversal, handler invocation. Uncovered: isTouchResponder, isEventEnabled edge cases, setNativeStateIfNeeded, tryGetContentOffset.
test(matchers/to-be-visible): Validates toBeVisible matcher correctly identifies visible elements - critical matcher users depend on for testing UI visibility state. Coverage: 77.04% statements (was 21.31%), 50% branches, 75% functions for to-be-visible.ts. Covered main matcher function, isElementVisible core logic, parent traversal. Uncovered: error message formatting, hidden-from-accessibility edge cases, style-based hiding (opacity/display), modal visibility check.
test(matchers/to-have-prop): Validates toHaveProp matcher checks element props with optional value matching - critical matcher users depend on for verifying component props. Coverage: 49.09% statements (was 12.72%), 100% branches, 33.33% functions for to-have-prop.ts. Covered main matcher function, prop existence check, value comparison. Uncovered: error message formatting (lines 25-41), formatProp helper (lines 45-55).
test(matchers/to-be-disabled): Validates toBeDisabled and toBeEnabled matchers check element disabled state via accessibilityState - critical matcher users depend on for testing disabled/enabled UI states. Coverage: 70.37% statements (was 22.22%), 83.33% branches, 60% functions for to-be-disabled.ts. Covered main matcher functions, computeAriaDisabled logic, both matchers. Uncovered: error message formatting (lines 17-24, 36-43).
test(matchers/to-contain-element): Validates toContainElement matcher checks if container element contains child element - critical matcher users depend on for testing component hierarchies and element relationships. Coverage: 75.67% statements (was 21.62%), 100% branches, 50% functions for to-contain-element.ts. Covered main matcher function, element containment check via queryAll. Uncovered: error message formatting (lines 27-35).
test(user-event/clear): Validates userEvent.clear() clears text from TextInput - critical API users depend on for clearing form inputs before typing new values. Coverage: 86.27% statements (was 21.56%), 60% branches, 100% functions for clear.ts. Covered main clear function, focus/select/backspace/blur sequence. Uncovered: error handling for non-TextInput elements (lines 14-18), early return for non-editable/disabled inputs (lines 21-22).
test(user-event/paste): Validates userEvent.paste() pastes text into TextInput replacing existing content - critical API users depend on for testing paste interactions in forms. Coverage: 79.41% statements (was 14.7%), 50% branches, 100% functions for paste.ts. Covered main paste function, focus/select/paste/blur sequence, text replacement. Uncovered: error handling for non-TextInput elements (lines 18-22), early return for non-editable/disabled inputs (lines 25-26), multiline contentSizeChange event (lines 56-62).
test(matchers/to-have-accessible-name): Validates toHaveAccessibleName matcher checks if element has accessible name via accessibilityLabel - critical matcher users depend on for testing accessibility where accessible names identify elements for screen readers. Coverage: 77.27% statements (was 20.45%), 40% branches, 50% functions for to-have-accessible-name.ts. Covered main matcher function, computeAccessibleName call, name matching with expected value, presence check without expected value. Uncovered: error message formatting (lines 33-42).
test(wait-for-element-to-be-removed): Validates waitForElementToBeRemoved resolves when query throws error after element is removed - critical behavior users depend on when elements are removed from DOM and queries throw. Coverage: 95.23% statements (was 61.9%), 80% branches, 100% functions for wait-for-element-to-be-removed.ts. Covered wait logic with error handling when expectation throws (lines 28-41), catch block that returns initialElements when element removed. Uncovered: lines 39-40 (edge case in removal detection).
test(matchers/to-have-style): Validates toHaveStyle matcher checks if element has expected style properties - critical matcher users depend on for testing styled components and verifying UI styling. Coverage: 51.38% statements (was 29.16%), 50% branches, 20% functions for to-have-style.ts. Covered main matcher function, style flattening, property comparison logic. Uncovered: error message formatting paths (success case lines 27-41, failure diff lines 48-51, helper functions lines 56-72).
test(matchers/to-be-busy): Validates toBeBusy matcher checks if element is busy via accessibilityState - critical matcher users depend on for testing loading states in components. Coverage: 66.66% statements (was 37.5%), 100% branches, 50% functions for to-be-busy.ts. Covered main matcher function, computeAriaBusy logic, busy and not-busy states. Uncovered: error message formatting (lines 15-22).
test(matchers/to-have-text-content): Validates toHaveTextContent matcher checks if element has expected text content - critical matcher users depend on for verifying text content in components. Coverage: 69.69% statements (was 27.27%), 33.33% branches, 50% functions for to-have-text-content.ts. Covered main matcher function, text content retrieval and matching. Uncovered: error message formatting (lines 22-31).
test(wait-for): Validates waitFor onTimeout callback customizes timeout error messages - critical feature users depend on for customizing error messages when async conditions timeout. Coverage: 67.5% statements (was 65%), 71.42% branches (was 68.96%), 100% functions for wait-for.ts. Covered onTimeout callback invocation and error replacement (lines 184-188). Uncovered: type checking (lines 33-34), fake timers path (lines 47-95), timer switching errors (lines 121-127), non-Error to Error conversion (lines 171-172).
test(matchers/to-be-empty-element): Validates toBeEmptyElement matcher checks if element has no host element children - critical matcher users depend on for testing empty states, loading states, and components that should render nothing. Coverage: 73.07% statements (was 34.61%), 100% branches, 50% functions for to-be-empty-element.ts. Covered main matcher function, children filtering logic, both positive and negative (.not) variants. Uncovered: error message formatting (lines 18-24).
test(matchers/to-be-checked): Validates toBeChecked matcher checks if element is checked via accessibilityState - critical matcher users depend on for testing checkbox/radio button states in forms and interactive components. Coverage: 68.08% statements (was 36.17%), 50% branches, 66.66% functions for to-be-checked.ts. Covered main matcher function, computeAriaChecked logic, checked and unchecked states, both positive and negative (.not) variants. Uncovered: error path for unsupported elements (lines 20-24), error message formatting (lines 29-36), helper function edge case (lines 42-43).
