Skip to content

Commit

Permalink
fix(searchbar): fix test unit
Browse files Browse the repository at this point in the history
  • Loading branch information
skhamvon authored and dpellier committed Feb 15, 2024
1 parent 0dd161f commit cab347f
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,8 @@ describe('spec:osds-search-bar', () => {
const spyEmitOdsSearchSubmit = jest.spyOn(instance.odsSearchSubmit, 'emit');
const enterKey = new KeyboardEvent('keydown', { code: 'Enter' });
instance.handlerOnKeydownInput(enterKey);
const spaceKey = new KeyboardEvent('keydown', { code: 'Space' });
instance.handlerOnKeydownInput(spaceKey);

expect(spyEmitOdsSearchSubmit).toHaveBeenCalledTimes(2);
expect(spyEmitOdsSearchSubmit).toHaveBeenCalledTimes(1);
expect(spyEmitOdsSearchSubmit).toHaveBeenCalledWith({ optionValue: '', inputValue: '' });
});

Expand Down

0 comments on commit cab347f

Please sign in to comment.