February 2019
Beginner
694 pages
18h 4m
English
As your test suite starts to grow, it becomes necessary at development time to limit the run of an entire test suite down to one specific test, or to one specific suite of tests. This is generally to find the cause of a specific failure, or to focus on a single suite of tests during the development of the code. Jasmine provides the fdescribe and fit functions to force the execution of tests as follows:
fdescribe("This is a forced suite", () => {
it("This is not a forced test", () => {
expect(true).toBeFalsy('true should be false');
});
fit("This is a forced test", () => {
expect(false).toBeFalsy();
})
});
Here, we have replaced the describe function with an fdescribe function. Or, more simply, we have inserted an f before the ...
Read now
Unlock full access