Skip to content

Commit

Permalink
Test timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
wyne committed Aug 3, 2024
1 parent bf660d5 commit 269b6e6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/Buttons/CheckButton.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import CheckButton from './CheckButton';

jest.mock('../../Analytics');

const getStore = () => {
const mockStore = () => {
return configureStore({
reducer: {
settings: settingsReducer,
Expand Down Expand Up @@ -42,7 +42,7 @@ describe('CheckButton', () => {
const navigation = useNavigationMock();

it('should navigate to Game screen when pressed', async () => {
const store = getStore();
const store = mockStore();

const { getByRole } = render(
<Provider store={store}>
Expand All @@ -56,10 +56,10 @@ describe('CheckButton', () => {
await waitFor(() => {
expect(navigation.navigate).toHaveBeenCalledWith('Game');
});
});
}, 10000);

it('should navigate back a screen when pressed', async () => {
const store = getStore();
const store = mockStore();

const { getByRole } = render(
<Provider store={store}>
Expand All @@ -73,10 +73,10 @@ describe('CheckButton', () => {
await waitFor(() => {
expect(navigation.navigate).toHaveBeenCalledWith('List');
});
});
}, 10000);

it('should log an analytics event when pressed', async () => {
const store = getStore();
const store = mockStore();

const { getByRole } = render(
<Provider store={store}>
Expand All @@ -90,5 +90,5 @@ describe('CheckButton', () => {
await waitFor(() => {
expect(logEvent).toHaveBeenCalledWith('save_game', expect.any(Object));
});
});
}, 10000);
});

0 comments on commit 269b6e6

Please sign in to comment.