Skip to content

Commit bf6b1f4

Browse files
committed
Debug tests failing in CI
1 parent 11e9407 commit bf6b1f4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

examples/cookbook/app/network-requests/PhoneBook.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ export default () => {
1515
const _getAllContacts = async () => {
1616
const _data = await getAllContacts();
1717
setUsersData(_data);
18-
console.log({
19-
_data,
20-
})
2118
};
2219
const _getAllFavorites = async () => {
2320
const _data = await getAllFavorites();
@@ -35,9 +32,8 @@ export default () => {
3532

3633
void run();
3734
}, []);
38-
console.log({
39-
usersData
40-
})
35+
36+
console.log({ usersData, favoritesData, error, time: new Date().toISOString() });
4137

4238
if (error) {
4339
return <Text>An error occurred: {error}</Text>;

examples/cookbook/app/network-requests/__tests__/PhoneBook.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ describe('PhoneBook', () => {
1515
(axios.get as jest.Mock).mockResolvedValue({ data: DATA });
1616
render(<PhoneBook />);
1717

18+
await new Promise((resolve) => setTimeout(resolve, 2000));
19+
screen.debug();
20+
1821
await waitForElementToBeRemoved(() => screen.getByText(/users data not quite there yet/i));
1922
expect(await screen.findByText('Name: Mrs Ida Kristensen')).toBeOnTheScreen();
2023
expect(await screen.findByText('Email: [email protected]')).toBeOnTheScreen();

0 commit comments

Comments
 (0)