Skip to main content

Global Testplane Helper

testplane.skip.in

This directive allows you to skip the test in a specific browser. For example, if you don't want to run the test in IE8:

describe("feature", function () {
testplane.skip.in("ie8", "it cannot work in this browser");
it("nowaday functionality", function () {
// ...
});
});

When using the testplane.skip.in directive, you will see a message in the report indicating that the run was skipped in the respective browser.

To skip the test runs without notifications in the report, you can pass a special flag silent to the helper as the third argument:

testplane.skip.in("ie8", "skipReason", { silent: true });

testplane.skip.notIn

This directive allows you to run the test only in a specific browser, for example, in Chrome:

describe("feature", function () {
testplane.skip.notIn("chrome", "it should work only in Chrome");
it("specific functionality", function () {
// ...
});
});

Similarly, to avoid notifications in the report, you can pass a special flag silent to the helper as the third argument:

testplane.skip.notIn("chrome", "skipReason", { silent: true });

testplane.only.in / testplane.only.notIn

These directives allow you to run the test only in a specific browser, whose logic is the opposite of the testplane.skip.in and testplane.skip.notIn directives. Additionally, these helpers do not, by default, produce any notifications in the report:

testplane.only.in("chrome"); // run the test only in Chrome
testplane.only.notIn("ie8"); // run the test in all browsers except IE8

testplane.also.in

If you are introducing a new browser and need to run it only in a few tests while having thousands of them, using the .skip.in helper may be inconvenient. You can use the passive browser option and the helper .also.in:

testplane.also.in("ie8"); // run the test in the passive browser IE8