diff options
| author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2022-05-05 00:15:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-05 01:15:54 +0200 |
| commit | ca134d25e1c281384a1a131c19d0574e7c8d30e8 (patch) | |
| tree | 90ffc4b39fc131f50eebab74c53c5b2b64eba32f /cli/tests/testdata/test/steps | |
| parent | 6a21fe745acf44fb32c294a34314abf58cc43c30 (diff) | |
feat(test): Show Deno.test() call locations for failures (#14484)
Diffstat (limited to 'cli/tests/testdata/test/steps')
| -rw-r--r-- | cli/tests/testdata/test/steps/failing_steps.out | 27 | ||||
| -rw-r--r-- | cli/tests/testdata/test/steps/invalid_usage.out | 51 |
2 files changed, 38 insertions, 40 deletions
diff --git a/cli/tests/testdata/test/steps/failing_steps.out b/cli/tests/testdata/test/steps/failing_steps.out index 2095eda51..5baa09ce7 100644 --- a/cli/tests/testdata/test/steps/failing_steps.out +++ b/cli/tests/testdata/test/steps/failing_steps.out @@ -3,7 +3,7 @@ running 3 tests from ./test/steps/failing_steps.ts nested failure ... step 1 ... inner 1 ... FAILED ([WILDCARD]) - Error: Failed. + error: Error: Failed. throw new Error("Failed."); ^ at [WILDCARD]/failing_steps.ts:[WILDCARD] @@ -13,12 +13,12 @@ nested failure ... FAILED ([WILDCARD]) multiple test step failures ... step 1 ... FAILED ([WILDCARD]) - Error: Fail. + error: Error: Fail. throw new Error("Fail."); ^ [WILDCARD] step 2 ... FAILED ([WILDCARD]) - Error: Fail. + error: Error: Fail. await t.step("step 2", () => Promise.reject(new Error("Fail."))); ^ at [WILDCARD]/failing_steps.ts:[WILDCARD] @@ -26,7 +26,7 @@ multiple test step failures ... FAILED ([WILDCARD]) failing step in failing test ... step 1 ... FAILED ([WILDCARD]) - Error: Fail. + error: Error: Fail. throw new Error("Fail."); ^ at [WILDCARD]/failing_steps.ts:[WILDCARD] @@ -35,28 +35,27 @@ FAILED ([WILDCARD]) failures: -./test/steps/failing_steps.ts > nested failure -Error: 1 test step failed. +nested failure => ./test/steps/failing_steps.ts:[WILDCARD] +error: Error: 1 test step failed. at runTest (deno:runtime/js/40_testing.js:[WILDCARD]) at async Object.runTests (deno:runtime/js/40_testing.js:[WILDCARD]) -./test/steps/failing_steps.ts > multiple test step failures -Error: 2 test steps failed. +multiple test step failures => ./test/steps/failing_steps.ts:[WILDCARD] +error: Error: 2 test steps failed. at runTest (deno:runtime/js/40_testing.js:[WILDCARD]) at async Object.runTests (deno:runtime/js/40_testing.js:[WILDCARD]) -./test/steps/failing_steps.ts > failing step in failing test -Error: Fail test. +failing step in failing test => ./test/steps/failing_steps.ts:[WILDCARD] +error: Error: Fail test. throw new Error("Fail test."); ^ at [WILDCARD]/failing_steps.ts:[WILDCARD] failures: - ./test/steps/failing_steps.ts - nested failure - multiple test step failures - failing step in failing test +nested failure => ./test/steps/failing_steps.ts:[WILDCARD] +multiple test step failures => ./test/steps/failing_steps.ts:[WILDCARD] +failing step in failing test => ./test/steps/failing_steps.ts:[WILDCARD] test result: FAILED. 0 passed (1 step); 3 failed (5 steps); 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) diff --git a/cli/tests/testdata/test/steps/invalid_usage.out b/cli/tests/testdata/test/steps/invalid_usage.out index 3b9921f14..afa19c53d 100644 --- a/cli/tests/testdata/test/steps/invalid_usage.out +++ b/cli/tests/testdata/test/steps/invalid_usage.out @@ -9,11 +9,11 @@ FAILED ([WILDCARD]) inner missing await ... step ... inner ... pending ([WILDCARD]) - Error: Parent scope completed before test step finished execution. Ensure all steps are awaited (ex. `await t.step(...)`). + error: Error: Parent scope completed before test step finished execution. Ensure all steps are awaited (ex. `await t.step(...)`). at [WILDCARD] at async TestContext.step [WILDCARD] FAILED ([WILDCARD]) - Error: There were still test steps running after the current scope finished execution. Ensure all steps are awaited (ex. `await t.step(...)`). + error: Error: There were still test steps running after the current scope finished execution. Ensure all steps are awaited (ex. `await t.step(...)`). await t.step("step", (t) => { ^ at [WILDCARD] @@ -22,7 +22,7 @@ FAILED ([WILDCARD]) parallel steps with sanitizers ... step 1 ... pending ([WILDCARD]) step 2 ... FAILED ([WILDCARD]) - Error: Cannot start test step while another test step with sanitizers is running. + error: Error: Cannot start test step while another test step with sanitizers is running. * parallel steps with sanitizers > step 1 await t.step("step 2", () => {}); ^ @@ -32,7 +32,7 @@ FAILED ([WILDCARD]) parallel steps when first has sanitizer ... step 1 ... pending ([WILDCARD]) step 2 ... FAILED ([WILDCARD]) - Error: Cannot start test step while another test step with sanitizers is running. + error: Error: Cannot start test step while another test step with sanitizers is running. * parallel steps when first has sanitizer > step 1 await t.step({ ^ @@ -42,7 +42,7 @@ FAILED ([WILDCARD]) parallel steps when second has sanitizer ... step 1 ... ok ([WILDCARD]) step 2 ... FAILED ([WILDCARD]) - Error: Cannot start test step with sanitizers while another test step is running. + error: Error: Cannot start test step with sanitizers while another test step is running. * parallel steps when second has sanitizer > step 1 await t.step({ ^ @@ -55,7 +55,7 @@ parallel steps where only inner tests have sanitizers ... ok ([WILDCARD]) step 2 ... step inner ... FAILED ([WILDCARD]) - Error: Cannot start test step with sanitizers while another test step is running. + error: Error: Cannot start test step with sanitizers while another test step is running. * parallel steps where only inner tests have sanitizers > step 1 await t.step({ ^ @@ -66,49 +66,48 @@ FAILED ([WILDCARD]) failures: -./test/steps/invalid_usage.ts > capturing -Error: Cannot run test step after parent scope has finished execution. Ensure any `.step(...)` calls are executed before their parent scope completes execution. +capturing => ./test/steps/invalid_usage.ts:[WILDCARD] +error: Error: Cannot run test step after parent scope has finished execution. Ensure any `.step(...)` calls are executed before their parent scope completes execution. await capturedContext.step("next step", () => {}); ^ at TestContext.step ([WILDCARD]) at [WILDCARD]/invalid_usage.ts:[WILDCARD] -./test/steps/invalid_usage.ts > top level missing await -Error: There were still test steps running after the current scope finished execution. Ensure all steps are awaited (ex. `await t.step(...)`). +top level missing await => ./test/steps/invalid_usage.ts:[WILDCARD] +error: Error: There were still test steps running after the current scope finished execution. Ensure all steps are awaited (ex. `await t.step(...)`). at postValidation [WILDCARD] at testStepSanitizer ([WILDCARD]) [WILDCARD] -./test/steps/invalid_usage.ts > inner missing await -Error: 1 test step failed. +inner missing await => ./test/steps/invalid_usage.ts:[WILDCARD] +error: Error: 1 test step failed. at [WILDCARD] -./test/steps/invalid_usage.ts > parallel steps with sanitizers -Error: There were still test steps running after the current scope finished execution. Ensure all steps are awaited (ex. `await t.step(...)`). +parallel steps with sanitizers => ./test/steps/invalid_usage.ts:[WILDCARD] +error: Error: There were still test steps running after the current scope finished execution. Ensure all steps are awaited (ex. `await t.step(...)`). at postValidation [WILDCARD] at testStepSanitizer ([WILDCARD]) [WILDCARD] -./test/steps/invalid_usage.ts > parallel steps when first has sanitizer -Error: 1 test step failed. +parallel steps when first has sanitizer => ./test/steps/invalid_usage.ts:[WILDCARD] +error: Error: 1 test step failed. at runTest ([WILDCARD]) at [WILDCARD] -./test/steps/invalid_usage.ts > parallel steps when second has sanitizer -Error: 1 test step failed. +parallel steps when second has sanitizer => ./test/steps/invalid_usage.ts:[WILDCARD] +error: Error: 1 test step failed. at runTest ([WILDCARD]) at [WILDCARD] failures: - ./test/steps/invalid_usage.ts - capturing - top level missing await - inner missing await - parallel steps with sanitizers - parallel steps when first has sanitizer - parallel steps when second has sanitizer - parallel steps where only inner tests have sanitizers +capturing => ./test/steps/invalid_usage.ts:[WILDCARD] +top level missing await => ./test/steps/invalid_usage.ts:[WILDCARD] +inner missing await => ./test/steps/invalid_usage.ts:[WILDCARD] +parallel steps with sanitizers => ./test/steps/invalid_usage.ts:[WILDCARD] +parallel steps when first has sanitizer => ./test/steps/invalid_usage.ts:[WILDCARD] +parallel steps when second has sanitizer => ./test/steps/invalid_usage.ts:[WILDCARD] +parallel steps where only inner tests have sanitizers => ./test/steps/invalid_usage.ts:[WILDCARD] test result: FAILED. 0 passed (4 steps); 7 failed (10 steps); 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) |
