February 2019
Beginner
694 pages
18h 4m
English
In a similar fashion to forcing tests, tests can be skipped using xit instead of it, and xdescribe instead of describe. This means that the tests will not be run as part of your suite. While there are legitimate reasons to skip tests in a production system, these reasons should always be an extreme circumstance, and should always be very short-lived.
We can skip a test in two ways. The first is by marking the test with an x, so instead of using it, use xit. The second way of skipping a test is by calling the pending function, as follows:
describe("skipped test examples", () => { xit("skipped test with no reason", () => { expect(false).toBeTruthy(); }); it("", () => { expect(false).toBeTruthy(); pending("this test should be ...Read now
Unlock full access