Skip to content

Commit b9a6953

Browse files
committed
chore: fix code cov
1 parent 5d2723a commit b9a6953

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/matchers/__tests__/to-be-checked.test.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,12 @@ test('throws error for invalid role', () => {
176176
`"toBeChecked() works only on accessibility elements with "checkbox" or "radio" role."`
177177
);
178178
});
179+
180+
test('throws error for non-accessibility element', () => {
181+
render(<View testID="test" />);
182+
183+
const view = screen.getByTestId('test');
184+
expect(() => expect(view).toBeChecked()).toThrowErrorMatchingInlineSnapshot(
185+
`"toBeChecked() works only on accessibility elements with "checkbox" or "radio" role."`
186+
);
187+
});

0 commit comments

Comments
 (0)