Skip to content
Prev Previous commit
Next Next commit
chore: fix test
  • Loading branch information
mdjastrzebski committed Aug 25, 2023
commit d79ffa047a2e37a2e45f34bd9ddfad9e01ec1e12
16 changes: 11 additions & 5 deletions src/matchers/__tests__/to-be-visible.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,17 @@ test('toBeVisible() on empty Modal', () => {

const modal = screen.getByTestId('modal');
expect(modal).toBeVisible();
expect(() =>
expect(modal).not.toBeVisible()
).toThrowErrorMatchingInlineSnapshot(
`"expect(...).not.oBeVisible is not a function"`
);
expect(() => expect(modal).not.toBeVisible())
.toThrowErrorMatchingInlineSnapshot(`
"expect(element).not.toBeVisible()

Received element is visible:
<Modal
hardwareAccelerated={false}
testID="modal"
visible={true}
/>"
`);
});

test('toBeVisible() on view within Modal', () => {
Expand Down