Skip to content

Commit

Permalink
fix(popover): change toBeFalse to toBe false in testing (#86)
Browse files Browse the repository at this point in the history
Signed-off-by: aurore.stagnol <[email protected]>
  • Loading branch information
astagnol authored Jun 27, 2023
1 parent bd63ae0 commit b2e74b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('spec:ods-popover-controller', () => {
Object.defineProperty(event, 'target', { value: target })

await controller.handleTriggerKey(event);
expect(component.surface.opened).toBeFalsy();
expect(component.surface.opened).toBe(false);
expect(component.surface.close).toHaveBeenCalledTimes(0);
});

Expand Down Expand Up @@ -211,7 +211,7 @@ describe('spec:ods-popover-controller', () => {
Object.defineProperty(event, 'target', { value: target })

await controller.checkForClickOutside(event);
expect(component.surface.opened).toBeFalsy();
expect(component.surface.opened).toBe(false);
});

it('should do nothing if event target is in the component', async () => {
Expand Down Expand Up @@ -267,7 +267,7 @@ describe('spec:ods-popover-controller', () => {
component.surface!.opened = false;

expect(() => { controller.closeSurface() }).not.toThrow();
expect(component.surface.opened).toBeFalsy();
expect(component.surface.opened).toBe(false);
expect(component.surface.close).toHaveBeenCalledTimes(0);

});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('spec:osds-popover', () => {
it('should not have yet the ref to surface', async () => {
ocdkIsSurface.mockImplementation(() => false);
await setup({ attributes: {}, html: `` });
expect(instance.surface).toBeFalsy();
expect(instance.surface).toBe(undefined);
})
});

Expand Down

0 comments on commit b2e74b7

Please sign in to comment.