Skip to content

Commit

Permalink
feat(content-sidebar): update unit test for sethasquestion callback
Browse files Browse the repository at this point in the history
  • Loading branch information
fpan225 committed Mar 3, 2025
1 parent bcd1d52 commit 6330455
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/elements/content-sidebar/__tests__/BoxAISidebar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,13 @@ describe('elements/content-sidebar/BoxAISidebar', () => {
});
});

test('should call setHasQuestions on load if questions is not empty', async () => {
test('should call setHasQuestions with "false" on load if questions are empty', async () => {
await renderComponent();

expect(mockProps.setHasQuestions).toHaveBeenCalledWith(false);
});

test('should call setHasQuestions with "true" on load if questions are not empty', async () => {
await renderComponent({
cache: {
encodedSession: '1234',
Expand Down

0 comments on commit 6330455

Please sign in to comment.