DEV Community

Discussion on: Improve your reds

Collapse
 
lexlohr profile image
Alex Lohr

The same is true for JavaScript. Jest (jestjs.io/) is especially powerful in that regard by allowing you to create your own matchers and/or overwrite existing ones and their messages while already delivering useful formatting on the existing ones (for example, expect(array).toHaveLength(3) will output the whole formatted array with the error for easy inspection.

Collapse
 
trikitrok profile image
Manuel Rivero

That's a nice example as well!