Created
February 2, 2023 13:21
-
-
Save pytqqq/e583169f94c9b14d7c07fb5b2d17fa59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const initialWindowMetrics = { | |
frame: { | |
x: 0, | |
y: 0, | |
width: 0, | |
height: 0, | |
}, | |
insets: { | |
top: 0, | |
left: 0, | |
right: 0, | |
bottom: 0, | |
}, | |
}; | |
test('Renders GameList', async () => { | |
const createWrapper = () => { | |
return ({children}) => ( | |
<NativeBaseProvider initialWindowMetrics={initialWindowMetrics}> | |
{children} | |
</NativeBaseProvider> | |
); | |
}; | |
const wrapper = createWrapper(); | |
render(<GameList />, {wrapper}); | |
const gameItems = await screen.findAllByTestId('game-item'); | |
expect(gameItems).toHaveLength(1000); | |
expect(screen.queryByTestId('spinner')).not.toBeTruthy(); | |
expect(screen.queryByTestId('list')).toBeTruthy(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment