Skip to content

Commit

Permalink
fix: Fix assertions in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drikusroor committed Sep 6, 2024
1 parent 45bb321 commit 8488fcc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/src/components/Trial/Trial.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ describe('Trial', () => {
fireEvent.click(screen.getByTestId('mock-feedback-form'));
await waitFor(() => {
expect(mockOnResult).toHaveBeenCalled();
expect(mockOnNext).toHaveBeenCalledTimes(1);
expect(mockOnNext).toHaveBeenCalled();
});
});

Expand All @@ -205,7 +205,7 @@ describe('Trial', () => {
};
const config = {
...defaultConfig,
break_round_on: { NOT: ['slow'] }
break_round_on: { EQUALS: ['slow'] }
};
render(<Trial
config={config}
Expand All @@ -214,9 +214,11 @@ describe('Trial', () => {
feedback_form={formless_feedback_form}
/>);
fireEvent.click(screen.getByTestId('mock-feedback-form'));

await waitFor(() => {
expect(mockOnResult).toHaveBeenCalled();
expect(mockOnNext).not.toHaveBeenCalled();
});

expect(mockOnNext).not.toHaveBeenCalled();
});
});

0 comments on commit 8488fcc

Please sign in to comment.