forked from denoland/deno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(test): output parallel test results independently (denoland#15399)
- Loading branch information
Showing
9 changed files
with
160 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Check [WILDCARD]/test/parallel_output.ts | ||
./test/parallel_output.ts => step output ... step 1 ... ok ([WILDCARD]ms) | ||
./test/parallel_output.ts => step output ... step 2 ... ok ([WILDCARD]ms) | ||
------- output ------- | ||
Hello, world! (from step 3) | ||
----- output end ----- | ||
./test/parallel_output.ts => step output ... step 3 ... ok ([WILDCARD]ms) | ||
------- output ------- | ||
Hello, world! (from step 4) | ||
----- output end ----- | ||
./test/parallel_output.ts => step output ... step 4 ... ok ([WILDCARD]ms) | ||
./test/parallel_output.ts => step output ... ok ([WILDCARD]ms) | ||
./test/parallel_output.ts => step failures ... step 1 ... ok ([WILDCARD]ms) | ||
./test/parallel_output.ts => step failures ... step 2 ... FAILED ([WILDCARD]ms) | ||
error: Error: Fail. | ||
throw new Error("Fail."); | ||
^ | ||
at file:https:///[WILDCARD]/test/parallel_output.ts:15:11 | ||
at [WILDCARD] | ||
at file:https:///[WILDCARD]/test/parallel_output.ts:14:11 | ||
./test/parallel_output.ts => step failures ... step 3 ... FAILED ([WILDCARD]ms) | ||
error: Error: Fail. | ||
await t.step("step 3", () => Promise.reject(new Error("Fail."))); | ||
^ | ||
at file:https:///[WILDCARD]/test/parallel_output.ts:17:47 | ||
at [WILDCARD] | ||
at file:https:///[WILDCARD]/test/parallel_output.ts:17:11 | ||
./test/parallel_output.ts => step failures ... FAILED ([WILDCARD]ms) | ||
./test/parallel_output.ts => step nested failure ... step 1 ... inner 1 ... ok ([WILDCARD]ms) | ||
./test/parallel_output.ts => step nested failure ... step 1 ... inner 2 ... FAILED ([WILDCARD]ms) | ||
error: Error: Failed. | ||
throw new Error("Failed."); | ||
^ | ||
at file:https:///[WILDCARD]/test/parallel_output.ts:24:13 | ||
at [WILDCARD] | ||
at file:https:///[WILDCARD]/test/parallel_output.ts:23:13 | ||
./test/parallel_output.ts => step nested failure ... step 1 ... FAILED ([WILDCARD]ms) | ||
./test/parallel_output.ts => step nested failure ... FAILED ([WILDCARD]ms) | ||
|
||
ERRORS | ||
|
||
step failures => ./test/parallel_output.ts:12:6 | ||
error: Error: 2 test steps failed. | ||
at [WILDCARD] | ||
|
||
step nested failure => ./test/parallel_output.ts:20:6 | ||
error: Error: 1 test step failed. | ||
at [WILDCARD] | ||
|
||
FAILURES | ||
|
||
step failures => ./test/parallel_output.ts:12:6 | ||
step nested failure => ./test/parallel_output.ts:20:6 | ||
|
||
FAILED | 1 passed (6 steps) | 2 failed (4 steps) ([WILDCARD]ms) | ||
|
||
error: Test failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Deno.test("step output", async (t) => { | ||
await t.step("step 1", () => {}); | ||
await t.step("step 2", () => {}); | ||
await t.step("step 3", () => { | ||
console.log("Hello, world! (from step 3)"); | ||
}); | ||
await t.step("step 4", () => { | ||
console.log("Hello, world! (from step 4)"); | ||
}); | ||
}); | ||
|
||
Deno.test("step failures", async (t) => { | ||
await t.step("step 1", () => {}); | ||
await t.step("step 2", () => { | ||
throw new Error("Fail."); | ||
}); | ||
await t.step("step 3", () => Promise.reject(new Error("Fail."))); | ||
}); | ||
|
||
Deno.test("step nested failure", async (t) => { | ||
await t.step("step 1", async (t) => { | ||
await t.step("inner 1", () => {}); | ||
await t.step("inner 2", () => { | ||
throw new Error("Failed."); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
Warning: --jobs flag is deprecated. Use the --parallel flag with possibly the 'DENO_JOBS' environment variable. | ||
Check [WILDCARD]/test/short-pass.ts | ||
running 1 test from ./test/short-pass.ts | ||
test ... ok ([WILDCARD]) | ||
./test/short-pass.ts => test ... ok ([WILDCARD]) | ||
|
||
ok | 1 passed | 0 failed ([WILDCARD]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
Check [WILDCARD]/test/short-pass.ts | ||
running 1 test from ./test/short-pass.ts | ||
test ... ok ([WILDCARD]) | ||
./test/short-pass.ts => test ... ok ([WILDCARD]) | ||
|
||
ok | 1 passed | 0 failed ([WILDCARD]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.