Diving deeper into unit testing vanilla JavaScript

On Friday, we looked at unit testing with vanilla JS. Today, we’re going to learn about some advanced matcher methods you can use.

On Friday, we looked at unit testing with vanilla JS. Today, we’re going to learn about some advanced matcher methods you can use.

You could build an entire suite of tests using just the expect.toBe() matcher. But Jest includes a bunch of other matcher methods to make testing a bit easier.

For example, we’re currently testing that the name variable works like this.