Is it possible to use assert.equal method in Node.js like this:
assert.equal(some_var, 12 OR 34);
If some_var is 12 or 34 I need the test to have passed.
you can do like this
expect([12, 34]).to.include(some_var);
i usually use chai to do unit test, but the concept should be the same.
assert([12, 34].includes(some_var));
It actually ends up 2 characters less than the chai solution
Copyright © 2021 Jogjafile Inc.
you can do like this
i usually use chai to do unit test, but the concept should be the same.