Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions src/__tests__/byText.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,37 @@ test('findByText queries work asynchronously', async () => {
await expect(findAllByText('Some Text')).resolves.toHaveLength(1);
}, 20000);

test.skip('getByText works properly with custom text component', () => {
function BoldText({ children }) {
return <Text>{children}</Text>;
}

expect(
render(
<Text>
<BoldText>Hello</BoldText>
</Text>
).getByText('Hello')
).toBeTruthy();
});

test.skip('getByText works properly with custom text container', () => {
function MyText({ children }) {
return <Text>{children}</Text>;
}
function BoldText({ children }) {
return <Text>{children}</Text>;
}

expect(
render(
<MyText>
<BoldText>Hello</BoldText>
</MyText>
).getByText('Hello')
).toBeTruthy();
});

test('queryByText nested <Image> in <Text> at start', () => {
expect(
render(
Expand Down