fune/testing/xpcshell/example/unit/test_tasks_skip.js
Mike de Boer 9b07b832b3 Bug 1380470 - Part 3 - Add add_task().skip() and add_task().only() for XPCShell unit tests. r=ahal
This suite already had `add_task.skip(aTask)` and `add_task.only(aTask)`
implemented, which required quite a bit more boilerplate code to get them right.
I removed this API in favor of `add_task(aTask).skip()` and `add_task(aTask).only()`
so that it's the same signature as Mochitest-browser and Mochitest-chrome.
I also noticed that `add_task` was defined twice, right above the other, which
was of course the latest version. I removed the latter.

MozReview-Commit-ID: BSCCXorzSlC

--HG--
extra : rebase_source : 9fe671baa357882258e1e94e47981185f37e246a
2017-07-18 15:07:38 +02:00

21 lines
448 B
JavaScript

"use strict";
add_task(async function skipMeNot1() {
Assert.ok(true, "Well well well.");
});
add_task(async function skipMe1() {
Assert.ok(false, "Not skipped after all.");
}).skip();
add_task(async function skipMeNot2() {
Assert.ok(true, "Well well well.");
});
add_task(async function skipMeNot3() {
Assert.ok(true, "Well well well.");
});
add_task(async function skipMe2() {
Assert.ok(false, "Not skipped after all.");
}).skip();