Skip to content

Commit

Permalink
Chore: trivial fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Nov 7, 2017
1 parent ec4d56c commit 21c0269
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/parallel.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,37 +240,37 @@ describe("[parallel]", () => {
describe("should abort other tasks when a task finished, when --race option was specified:", () => {
it("Node API", async () => {
await nodeApi(["test-task:append1 a", "test-task:append2 b"], { parallel: true, race: true })
await delay(1000)
await delay(5000)
assert(result() === "a" || result() === "ab" || result() === "ba")
})

it("npm-run-all command (--race)", async () => {
await runAll(["--race", "--parallel", "test-task:append1 a", "test-task:append2 b"])
await delay(1000)
await delay(5000)
assert(result() === "a" || result() === "ab" || result() === "ba")
})

it("npm-run-all command (-r)", async () => {
await runAll(["-rp", "test-task:append1 a", "test-task:append2 b"])
await delay(1000)
await delay(5000)
assert(result() === "a" || result() === "ab" || result() === "ba")
})

it("run-p command (--race)", async () => {
await runPar(["--race", "test-task:append1 a", "test-task:append2 b"])
await delay(1000)
await delay(5000)
assert(result() === "a" || result() === "ab" || result() === "ba")
})

it("run-p command (-r)", async () => {
await runPar(["-r", "test-task:append1 a", "test-task:append2 b"])
await delay(1000)
await delay(5000)
assert(result() === "a" || result() === "ab" || result() === "ba")
})

it("run-p command (no -r)", async () => {
await runPar(["test-task:append1 a", "test-task:append2 b"])
await delay(1000)
await delay(5000)
assert(result() === "abb" || result() === "bab")
})
})
Expand Down

0 comments on commit 21c0269

Please sign in to comment.