#Storybook testing
4 messages · Page 1 of 1 (latest)
Play functions use testing library. There's a section in their docs: https://testing-library.com/docs/guide-disappearance/#asserting-elements-are-not-present
4 messages · Page 1 of 1 (latest)
How would I assert that an element in not in the dom with a play function?
tried this:
expect(canvas.getAllByRole('link', {name: 'Test 1'}).count()).toEqual(0);
But, .get* seem to just error instead of returning an empty results.
Play functions use testing library. There's a section in their docs: https://testing-library.com/docs/guide-disappearance/#asserting-elements-are-not-present