M
M
maratt2020-01-08 17:35:36
JavaScript
maratt, 2020-01-08 17:35:36

What is the right way to test with jest?

if result.aaa must be equal to variable a, then I do this,
expect(result.aaa).toBe(a);
but if it can equal variable a or variable b?
can it be written like that?
expect(result.aaa).toBe(a || b);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2020-01-08
@maratt

Maybe choose something
from this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question