Exercises
Using the techniques you’ve just learned, create a new matcher named toHaveClass
that replaces the following expectation:
expect(secondButton().className).toContain("toggled");
With your new matcher in place, it should read as follows:
expect(secondButton()).toHaveClass("toggled");
There is also the negated form of this matcher:
expect(secondButton().className).not.toContain("toggled");
Your matcher should work for this form and display an appropriate failure message.