Skip to content

Commit

Permalink
modified the test file
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMilord committed Nov 21, 2024
1 parent 360ff19 commit c899b5f
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,13 @@ const mockDidYouMeanState = {
hasQueryCorrection: true,
};

const mockQueryTriggerState = {
newQuery: 'example new query',
originalQuery: 'example original query',
wasQueryModified: true,
};

const functionsMocks = {
buildDidYouMean: jest.fn(() => ({
state: mockDidYouMeanState,
subscribe: functionsMocks.subscribe,
})),
buildQueryTrigger: jest.fn(() => ({
state: mockQueryTriggerState,
state: {},
subscribe: functionsMocks.subscribe,
})),
applyCorrection: jest.fn(() => {}),
Expand Down Expand Up @@ -117,6 +111,7 @@ describe('c-quantic-did-you-mean', () => {
await flushPromises();

expect(functionsMocks.buildDidYouMean).toHaveBeenCalled();
expect(functionsMocks.subscribe).toHaveBeenCalled();
});

describe('#disableQueryAutoCorrection property', () => {
Expand Down

0 comments on commit c899b5f

Please sign in to comment.