refactor(tests): move all tests to __tests__ folders next to source files

This commit is contained in:
Maciej Jastrzębski
2026-01-08 23:30:25 +01:00
parent 8a14e2a006
commit 5148a21b73
4 changed files with 6 additions and 5 deletions
@@ -1,8 +1,8 @@
import * as React from 'react';
import { Text, View } from 'react-native';
import './matchers/extend-expect';
import { render } from './render';
import { screen } from './screen';
import '../matchers/extend-expect';
import { render } from '../render';
import { screen } from '../screen';
it('renders a React Native component and makes it queryable', async () => {
const Component = () => (
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Text, View } from 'react-native';
import { render } from '..';
import { render } from '../..';
it('finds elements by role with name option using text fallback when accessible name is not set', async () => {
const Component = () => (
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Text, View } from 'react-native';
import { render, screen } from '..';
import { render, screen } from '../..';
it('finds text elements using partial matching when exact option is false', async () => {
const Component = () => (
+1
View File
@@ -1,2 +1,3 @@
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.