summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/test/steps
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/test/steps')
-rw-r--r--cli/tests/testdata/test/steps/failing_steps.out61
-rw-r--r--cli/tests/testdata/test/steps/invalid_usage.out110
-rw-r--r--cli/tests/testdata/test/steps/invalid_usage.ts2
3 files changed, 71 insertions, 102 deletions
diff --git a/cli/tests/testdata/test/steps/failing_steps.out b/cli/tests/testdata/test/steps/failing_steps.out
index c68889c8d..4b717f5cc 100644
--- a/cli/tests/testdata/test/steps/failing_steps.out
+++ b/cli/tests/testdata/test/steps/failing_steps.out
@@ -3,47 +3,42 @@ running 3 tests from ./test/steps/failing_steps.ts
nested failure ...
step 1 ...
inner 1 ... FAILED ([WILDCARD])
- error: Error: Failed.
- throw new Error("Failed.");
- ^
- at [WILDCARD]/failing_steps.ts:[WILDCARD]
- [WILDCARD]
inner 2 ... ok ([WILDCARD])
- step 1 ... FAILED ([WILDCARD])
-nested failure ... FAILED ([WILDCARD])
+ step 1 ... FAILED (due to 1 failed step) ([WILDCARD])
+nested failure ... FAILED (due to 1 failed step) ([WILDCARD])
multiple test step failures ...
step 1 ... FAILED ([WILDCARD])
- error: Error: Fail.
- throw new Error("Fail.");
- ^
- [WILDCARD]
step 2 ... FAILED ([WILDCARD])
- error: Error: Fail.
- await t.step("step 2", () => Promise.reject(new Error("Fail.")));
- ^
- at [WILDCARD]/failing_steps.ts:[WILDCARD]
- [WILDCARD]
-multiple test step failures ... FAILED ([WILDCARD])
+multiple test step failures ... FAILED (due to 2 failed steps) ([WILDCARD])
failing step in failing test ...
step 1 ... FAILED ([WILDCARD])
- error: Error: Fail.
- throw new Error("Fail.");
- ^
- at [WILDCARD]/failing_steps.ts:[WILDCARD]
- at [WILDCARD]
failing step in failing test ... FAILED ([WILDCARD])
ERRORS
-nested failure => ./test/steps/failing_steps.ts:[WILDCARD]
-error: Error: 1 test step failed.
- at runTest (ext:cli/40_testing.js:[WILDCARD])
- at async runTests (ext:cli/40_testing.js:[WILDCARD])
+nested failure ... step 1 ... inner 1 => ./test/steps/failing_steps.ts:[WILDCARD]
+error: Error: Failed.
+ throw new Error("Failed.");
+ ^
+ at [WILDCARD]/failing_steps.ts:[WILDCARD]
+
+multiple test step failures ... step 1 => ./test/steps/failing_steps.ts:[WILDCARD]
+error: Error: Fail.
+ throw new Error("Fail.");
+ ^
+ at [WILDCARD]/failing_steps.ts:[WILDCARD]
-multiple test step failures => ./test/steps/failing_steps.ts:[WILDCARD]
-error: Error: 2 test steps failed.
- at runTest (ext:cli/40_testing.js:[WILDCARD])
- at async runTests (ext:cli/40_testing.js:[WILDCARD])
+multiple test step failures ... step 2 => ./test/steps/failing_steps.ts:[WILDCARD]
+error: Error: Fail.
+ await t.step("step 2", () => Promise.reject(new Error("Fail.")));
+ ^
+ at [WILDCARD]/failing_steps.ts:[WILDCARD]
+
+failing step in failing test ... step 1 => ./test/steps/failing_steps.ts:[WILDCARD]
+error: Error: Fail.
+ throw new Error("Fail.");
+ ^
+ at [WILDCARD]/failing_steps.ts:[WILDCARD]
failing step in failing test => ./test/steps/failing_steps.ts:[WILDCARD]
error: Error: Fail test.
@@ -53,8 +48,10 @@ error: Error: Fail test.
FAILURES
-nested failure => ./test/steps/failing_steps.ts:[WILDCARD]
-multiple test step failures => ./test/steps/failing_steps.ts:[WILDCARD]
+nested failure ... step 1 ... inner 1 => ./test/steps/failing_steps.ts:[WILDCARD]
+multiple test step failures ... step 1 => ./test/steps/failing_steps.ts:[WILDCARD]
+multiple test step failures ... step 2 => ./test/steps/failing_steps.ts:[WILDCARD]
+failing step in failing test ... step 1 => ./test/steps/failing_steps.ts:[WILDCARD]
failing step in failing test => ./test/steps/failing_steps.ts:[WILDCARD]
FAILED | 0 passed (1 step) | 3 failed (5 steps) ([WILDCARD])
diff --git a/cli/tests/testdata/test/steps/invalid_usage.out b/cli/tests/testdata/test/steps/invalid_usage.out
index dc97a5eed..311be4fd7 100644
--- a/cli/tests/testdata/test/steps/invalid_usage.out
+++ b/cli/tests/testdata/test/steps/invalid_usage.out
@@ -4,65 +4,33 @@ capturing ...
some step ... ok ([WILDCARD])
capturing ... FAILED ([WILDCARD])
top level missing await ...
- step ... pending ([WILDCARD])
-top level missing await ... FAILED ([WILDCARD])
+ step ... INCOMPLETE
+top level missing await ... FAILED (due to incomplete steps) ([WILDCARD])
inner missing await ...
step ...
- inner ... pending ([WILDCARD])
- 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]
- step ... FAILED ([WILDCARD])
- 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]
- at async fn ([WILDCARD]/invalid_usage.ts:[WILDCARD])
-inner missing await ... FAILED ([WILDCARD])
+ inner ... INCOMPLETE
+ step ... FAILED (due to incomplete steps) ([WILDCARD])
+inner missing await ... FAILED (due to 1 failed step) ([WILDCARD])
parallel steps with sanitizers ...
- step 1 ... pending ([WILDCARD])
+ step 1 ... INCOMPLETE
step 2 ... FAILED ([WILDCARD])
- 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", () => {});
- ^
- at [WILDCARD]
- at [WILDCARD]/invalid_usage.ts:[WILDCARD]
-parallel steps with sanitizers ... FAILED ([WILDCARD])
+parallel steps with sanitizers ... FAILED (due to incomplete steps) ([WILDCARD])
parallel steps when first has sanitizer ...
- step 1 ... pending ([WILDCARD])
+ step 1 ... ok ([WILDCARD])
step 2 ... FAILED ([WILDCARD])
- 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({
- ^
- at [WILDCARD]
- at [WILDCARD]/invalid_usage.ts:[WILDCARD]
-parallel steps when first has sanitizer ... FAILED ([WILDCARD])
+parallel steps when first has sanitizer ... FAILED (due to 1 failed step) ([WILDCARD])
parallel steps when second has sanitizer ...
step 1 ... ok ([WILDCARD])
step 2 ... FAILED ([WILDCARD])
- 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({
- ^
- at [WILDCARD]
- at [WILDCARD]/invalid_usage.ts:[WILDCARD]
-parallel steps when second has sanitizer ... FAILED ([WILDCARD])
+parallel steps when second has sanitizer ... FAILED (due to 1 failed step) ([WILDCARD])
parallel steps where only inner tests have sanitizers ...
step 1 ...
step inner ... ok ([WILDCARD])
step 1 ... ok ([WILDCARD])
step 2 ...
step inner ... FAILED ([WILDCARD])
- 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({
- ^
- at [WILDCARD]
- at [WILDCARD]/invalid_usage.ts:[WILDCARD]
- step 2 ... FAILED ([WILDCARD])
-parallel steps where only inner tests have sanitizers ... FAILED ([WILDCARD])
+ step 2 ... FAILED (due to 1 failed step) ([WILDCARD])
+parallel steps where only inner tests have sanitizers ... FAILED (due to 1 failed step) ([WILDCARD])
ERRORS
@@ -73,38 +41,42 @@ error: Error: Cannot run test step after parent scope has finished execution. En
at TestContext.step ([WILDCARD])
at [WILDCARD]/invalid_usage.ts:[WILDCARD]
-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(...)`).
- [WILDCARD]
+top level missing await ... step => ./test/steps/invalid_usage.ts:[WILDCARD]
+error: Didn't complete before parent. Await step with `await t.step(...)`.
+
+inner missing await ... step ... inner => ./test/steps/invalid_usage.ts:[WILDCARD]
+error: Didn't complete before parent. Await step with `await t.step(...)`.
-inner missing await => ./test/steps/invalid_usage.ts:[WILDCARD]
-error: Error: 1 test step failed.
- at [WILDCARD]
+parallel steps with sanitizers ... step 2 => ./test/steps/invalid_usage.ts:[WILDCARD]
+error: Started test step while another test step with sanitizers was running:
+ * parallel steps with sanitizers ... step 1
-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(...)`).
- [WILDCARD]
+parallel steps with sanitizers ... step 1 => ./test/steps/invalid_usage.ts:[WILDCARD]
+error: Didn't complete before parent. Await step with `await t.step(...)`.
-parallel steps when first has sanitizer => ./test/steps/invalid_usage.ts:[WILDCARD]
-error: Error: 1 test step failed.
- at runTest ([WILDCARD])
- at [WILDCARD]
+parallel steps when first has sanitizer ... step 2 => ./test/steps/invalid_usage.ts:[WILDCARD]
+error: Started test step while another test step with sanitizers was running:
+ * parallel steps when first has sanitizer ... step 1
-parallel steps when second has sanitizer => ./test/steps/invalid_usage.ts:[WILDCARD]
-error: Error: 1 test step failed.
- at runTest ([WILDCARD])
- at [WILDCARD]
+parallel steps when second has sanitizer ... step 2 => ./test/steps/invalid_usage.ts:[WILDCARD]
+error: Started test step with sanitizers while another test step was running:
+ * parallel steps when second has sanitizer ... step 1
+
+parallel steps where only inner tests have sanitizers ... step 2 ... step inner => ./test/steps/invalid_usage.ts:[WILDCARD]
+error: Started test step with sanitizers while another test step was running:
+ * parallel steps where only inner tests have sanitizers ... step 1
FAILURES
-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]
+capturing => ./test/steps/invalid_usage.ts:3:6
+top level missing await ... step => ./test/steps/invalid_usage.ts:[WILDCARD]
+inner missing await ... step ... inner => ./test/steps/invalid_usage.ts:[WILDCARD]
+parallel steps with sanitizers ... step 2 => ./test/steps/invalid_usage.ts:[WILDCARD]
+parallel steps with sanitizers ... step 1 => ./test/steps/invalid_usage.ts:[WILDCARD]
+parallel steps when first has sanitizer ... step 2 => ./test/steps/invalid_usage.ts:[WILDCARD]
+parallel steps when second has sanitizer ... step 2 => ./test/steps/invalid_usage.ts:[WILDCARD]
+parallel steps where only inner tests have sanitizers ... step 2 ... step inner => ./test/steps/invalid_usage.ts:[WILDCARD]
-FAILED | 0 passed (4 steps) | 7 failed (10 steps) ([WILDCARD])
+FAILED | 0 passed (5 steps) | 7 failed (9 steps) ([WILDCARD])
error: Test failed
diff --git a/cli/tests/testdata/test/steps/invalid_usage.ts b/cli/tests/testdata/test/steps/invalid_usage.ts
index bc761b5dd..fcbe8b454 100644
--- a/cli/tests/testdata/test/steps/invalid_usage.ts
+++ b/cli/tests/testdata/test/steps/invalid_usage.ts
@@ -11,7 +11,7 @@ Deno.test("capturing", async (t) => {
Deno.test("top level missing await", (t) => {
t.step("step", () => {
- return new Promise((resolve) => setTimeout(resolve, 10));
+ return new Promise(() => {});
});
});