-
Notifications
You must be signed in to change notification settings - Fork 5.8k
fix(test): output parallel test results independently #15399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1377db2
feat(test): output parallel test results independently
nayeemrmn d77e07f
Update fixtures
nayeemrmn 87570e9
Merge remote-tracking branch 'upstream/main' into test-parallel-output
nayeemrmn 0ee9ef6
Merge remote-tracking branch 'upstream/main' into test-parallel-output
nayeemrmn 6a2091e
Cycle cache key
nayeemrmn 63bd66f
Remove TestFlags::parallel
nayeemrmn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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:///[WILDCARD]/test/parallel_output.ts:15:11 | ||
| at [WILDCARD] | ||
| at file:///[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:///[WILDCARD]/test/parallel_output.ts:17:47 | ||
| at [WILDCARD] | ||
| at file:///[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:///[WILDCARD]/test/parallel_output.ts:24:13 | ||
| at [WILDCARD] | ||
| at file:///[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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.