Front-End Insights

#3 Testing with Jasmine – matchers and other features


Welcome again to my “testing with Jasmine” series. Previously, we discussed how Jasmine uses a behaviour-driven development approach. I announced then that this time I will write something about matchers, test cleanup and preparation, and about disabling and pausing tests.

TL;DR; matchers are kinds of assertions; test preparation can be done using beforeEach/beforeAll methods and test teardown might be done using afterEach/afterAll methods; test suite can be disabled by changing the method describe to xdescribe; a single test can be paused by changing the it method to xit or by removing the function callback or by invoking the pending method inside the spec callback

Related Post