describe.each
not testing not.${outcome}
properly
#547
Unanswered
sonya-invoicesimple
asked this question in
Q&A
Replies: 1 comment
-
I do not see a way to easily do this. It's a bit "hacky", TBH. A few ways in which I see you can go forward with this approach:
(1) Using lodash's
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to write following test to clean huge test files:
However, when I try to assert each test like this:
I run into an issue that positive outcome goes through, while
not
just breaks the tests and throws following TypeError in console:I am aware that you can work around this bottleneck with
true/false
statuses andtoHaveAttribute
orif...else
checker, however former option limits your pool of assertions while latter is a very bad practice for testing.Do you know if there is a way to make
not.toBeInTheDocument
(or honestly any other assertion) work without throwing TypeError?Beta Was this translation helpful? Give feedback.
All reactions