Reputation: 47
I would like to know if there exists something in Jasmine like @ignore in JUnit. I would like to ignore some tests, but not all.
I'm refering something like this:
@Ignore
describe("Hello world", function() {
it("says hello", function() {
expect(helloWorld()).toEqual("Hello world!");
});
});
Thanks
Upvotes: 1
Views: 77
Reputation: 3758
From jasmine docs:
Suites can be disabled with the xdescribe function. These suites and any specs inside them are skipped when run and thus their results will show as pending.
Source: https://jasmine.github.io/2.5/introduction#section-Disabling_Suites
Upvotes: 2
Reputation: 190925
You can prefix either the describe
or it
blocks with x
and they will be disabled. So in effect you are calling xdescribe
or xit
.
xdescribe("Hello world", function() {
it("says hello", function() {
expect(helloWorld()).toEqual("Hello world!");
});
});
Upvotes: 3