4 ms·
> "matchers" [...] let you test values in different ways Example docs for Jest's matchers: https://jestjs.io/docs/en/using-matchers https://jestjs.io/docs/en/u
by allover 7y ago
> "matchers" [...] let you test values in different ways
Example docs for Jest's matchers: https://jestjs.io/docs/en/using-matchers https://jestjs.io/docs/en/using-matchers
Generally speaking, if you use a specific matcher, you get a better (more informative) error message when the test fails.
- jfkebwjsbx 7y agoAh, the common testing functions like `assert_equal`. Thanks!
- hinkley 7y agoRight, and some APIs let you write your own. Getting a custom one to hand out actionable error messages is a bit tricky but quite worth it.