summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tests/integration/test_tests.rs6
-rw-r--r--cli/tests/testdata/compat/test_runner/cjs.out11
-rw-r--r--cli/tests/testdata/compat/test_runner/esm.out11
-rw-r--r--cli/tests/testdata/test/aggregate_error.out7
-rw-r--r--cli/tests/testdata/test/allow_all.out28
-rw-r--r--cli/tests/testdata/test/allow_none.out29
-rw-r--r--cli/tests/testdata/test/clear_timeout.out8
-rw-r--r--cli/tests/testdata/test/collect.out2
-rw-r--r--cli/tests/testdata/test/doc_only.out2
-rw-r--r--cli/tests/testdata/test/exit_sanitizer.out15
-rw-r--r--cli/tests/testdata/test/fail.out43
-rw-r--r--cli/tests/testdata/test/fail_fast.out7
-rw-r--r--cli/tests/testdata/test/filter.out12
-rw-r--r--cli/tests/testdata/test/finally_timeout.out9
-rw-r--r--cli/tests/testdata/test/ignore.out22
-rw-r--r--cli/tests/testdata/test/ignore_permissions.out4
-rw-r--r--cli/tests/testdata/test/interval.out2
-rw-r--r--cli/tests/testdata/test/load_unload.out4
-rw-r--r--cli/tests/testdata/test/meta.out2
-rw-r--r--cli/tests/testdata/test/no_prompt_by_default.out7
-rw-r--r--cli/tests/testdata/test/no_prompt_with_denied_perms.out7
-rw-r--r--cli/tests/testdata/test/only.out4
-rw-r--r--cli/tests/testdata/test/ops_sanitizer_missing_details.out7
-rw-r--r--cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out11
-rw-r--r--cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests_no_trace.out11
-rw-r--r--cli/tests/testdata/test/ops_sanitizer_nexttick.out6
-rw-r--r--cli/tests/testdata/test/ops_sanitizer_timeout_failure.out4
-rw-r--r--cli/tests/testdata/test/ops_sanitizer_unstable.out9
-rw-r--r--cli/tests/testdata/test/overloads.out14
-rw-r--r--cli/tests/testdata/test/pass.out22
-rw-r--r--cli/tests/testdata/test/quiet.out10
-rw-r--r--cli/tests/testdata/test/resource_sanitizer.out7
-rw-r--r--cli/tests/testdata/test/shuffle.out66
-rw-r--r--cli/tests/testdata/test/steps/failing_steps.out27
-rw-r--r--cli/tests/testdata/test/steps/ignored_steps.out8
-rw-r--r--cli/tests/testdata/test/steps/invalid_usage.out57
-rw-r--r--cli/tests/testdata/test/steps/passing_steps.out48
-rw-r--r--cli/tests/testdata/test/text.out2
-rw-r--r--cli/tools/test.rs59
39 files changed, 333 insertions, 277 deletions
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs
index 9c1ad3f47..307f0f1fe 100644
--- a/cli/tests/integration/test_tests.rs
+++ b/cli/tests/integration/test_tests.rs
@@ -13,9 +13,9 @@ fn no_color() {
false,
);
// ANSI escape codes should be stripped.
- assert!(out.contains("test success ... ok"));
- assert!(out.contains("test fail ... FAILED"));
- assert!(out.contains("test ignored ... ignored"));
+ assert!(out.contains("success ... ok"));
+ assert!(out.contains("fail ... FAILED"));
+ assert!(out.contains("ignored ... ignored"));
assert!(out.contains("test result: FAILED. 1 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out"));
}
diff --git a/cli/tests/testdata/compat/test_runner/cjs.out b/cli/tests/testdata/compat/test_runner/cjs.out
index 91298e91e..02d86891b 100644
--- a/cli/tests/testdata/compat/test_runner/cjs.out
+++ b/cli/tests/testdata/compat/test_runner/cjs.out
@@ -1,10 +1,10 @@
-running 2 tests from [WILDCARD]
-test Correct assertion ... ok ([WILDCARD])
-test Failed assertion ... FAILED ([WILDCARD])
+running 2 tests from compat/test_runner/cjs.js
+Correct assertion ... ok ([WILDCARD])
+Failed assertion ... FAILED ([WILDCARD])
failures:
-Failed assertion
+compat/test_runner/cjs.js > Failed assertion
AssertionError [ERR_ASSERTION]: Values are not strictly equal:
@@ -18,7 +18,8 @@ AssertionError [ERR_ASSERTION]: Values are not strictly equal:
failures:
-[WILDCARD]Failed assertion
+ compat/test_runner/cjs.js
+ Failed assertion
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/compat/test_runner/esm.out b/cli/tests/testdata/compat/test_runner/esm.out
index 91298e91e..73cfe7826 100644
--- a/cli/tests/testdata/compat/test_runner/esm.out
+++ b/cli/tests/testdata/compat/test_runner/esm.out
@@ -1,10 +1,10 @@
-running 2 tests from [WILDCARD]
-test Correct assertion ... ok ([WILDCARD])
-test Failed assertion ... FAILED ([WILDCARD])
+running 2 tests from compat/test_runner/esm.mjs
+Correct assertion ... ok ([WILDCARD])
+Failed assertion ... FAILED ([WILDCARD])
failures:
-Failed assertion
+compat/test_runner/esm.mjs > Failed assertion
AssertionError [ERR_ASSERTION]: Values are not strictly equal:
@@ -18,7 +18,8 @@ AssertionError [ERR_ASSERTION]: Values are not strictly equal:
failures:
-[WILDCARD]Failed assertion
+ compat/test_runner/esm.mjs
+ Failed assertion
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/aggregate_error.out b/cli/tests/testdata/test/aggregate_error.out
index ed1ee1a94..1fbdcb350 100644
--- a/cli/tests/testdata/test/aggregate_error.out
+++ b/cli/tests/testdata/test/aggregate_error.out
@@ -1,10 +1,10 @@
Check [WILDCARD]/testdata/test/aggregate_error.ts
-running 1 test from [WILDCARD]/testdata/test/aggregate_error.ts
-test aggregate ... FAILED ([WILDCARD])
+running 1 test from test/aggregate_error.ts
+aggregate ... FAILED ([WILDCARD])
failures:
-aggregate
+test/aggregate_error.ts > aggregate
AggregateError
Error: Error 1
at [WILDCARD]/testdata/test/aggregate_error.ts:2:18
@@ -17,6 +17,7 @@ AggregateError
failures:
+ test/aggregate_error.ts
aggregate
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/allow_all.out b/cli/tests/testdata/test/allow_all.out
index 9b7367b94..42719ee62 100644
--- a/cli/tests/testdata/test/allow_all.out
+++ b/cli/tests/testdata/test/allow_all.out
@@ -1,18 +1,18 @@
[WILDCARD]
running 14 tests from [WILDCARD]
-test read false ... ok [WILDCARD]
-test read true ... ok [WILDCARD]
-test write false ... ok [WILDCARD]
-test write true ... ok [WILDCARD]
-test net false ... ok [WILDCARD]
-test net true ... ok [WILDCARD]
-test env false ... ok [WILDCARD]
-test env true ... ok [WILDCARD]
-test run false ... ok [WILDCARD]
-test run true ... ok [WILDCARD]
-test ffi false ... ok [WILDCARD]
-test ffi true ... ok [WILDCARD]
-test hrtime false ... ok [WILDCARD]
-test hrtime true ... ok [WILDCARD]
+read false ... ok [WILDCARD]
+read true ... ok [WILDCARD]
+write false ... ok [WILDCARD]
+write true ... ok [WILDCARD]
+net false ... ok [WILDCARD]
+net true ... ok [WILDCARD]
+env false ... ok [WILDCARD]
+env true ... ok [WILDCARD]
+run false ... ok [WILDCARD]
+run true ... ok [WILDCARD]
+ffi false ... ok [WILDCARD]
+ffi true ... ok [WILDCARD]
+hrtime false ... ok [WILDCARD]
+hrtime true ... ok [WILDCARD]
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD]
diff --git a/cli/tests/testdata/test/allow_none.out b/cli/tests/testdata/test/allow_none.out
index b79c7e6bf..1310e2689 100644
--- a/cli/tests/testdata/test/allow_none.out
+++ b/cli/tests/testdata/test/allow_none.out
@@ -1,45 +1,46 @@
[WILDCARD]
running 7 tests from [WILDCARD]
-test read ... FAILED [WILDCARD]
-test write ... FAILED [WILDCARD]
-test net ... FAILED [WILDCARD]
-test env ... FAILED [WILDCARD]
-test run ... FAILED [WILDCARD]
-test ffi ... FAILED [WILDCARD]
-test hrtime ... FAILED [WILDCARD]
+read ... FAILED [WILDCARD]
+write ... FAILED [WILDCARD]
+net ... FAILED [WILDCARD]
+env ... FAILED [WILDCARD]
+run ... FAILED [WILDCARD]
+ffi ... FAILED [WILDCARD]
+hrtime ... FAILED [WILDCARD]
failures:
-read
+test/allow_none.ts > read
PermissionDenied: Can't escalate parent thread permissions
[WILDCARD]
-write
+test/allow_none.ts > write
PermissionDenied: Can't escalate parent thread permissions
[WILDCARD]
-net
+test/allow_none.ts > net
PermissionDenied: Can't escalate parent thread permissions
[WILDCARD]
-env
+test/allow_none.ts > env
PermissionDenied: Can't escalate parent thread permissions
[WILDCARD]
-run
+test/allow_none.ts > run
PermissionDenied: Can't escalate parent thread permissions
[WILDCARD]
-ffi
+test/allow_none.ts > ffi
PermissionDenied: Can't escalate parent thread permissions
[WILDCARD]
-hrtime
+test/allow_none.ts > hrtime
PermissionDenied: Can't escalate parent thread permissions
[WILDCARD]
failures:
+ test/allow_none.ts
read
write
net
diff --git a/cli/tests/testdata/test/clear_timeout.out b/cli/tests/testdata/test/clear_timeout.out
index c9f459dbe..3678baea0 100644
--- a/cli/tests/testdata/test/clear_timeout.out
+++ b/cli/tests/testdata/test/clear_timeout.out
@@ -1,8 +1,8 @@
Check [WILDCARD]/test/clear_timeout.ts
-running 3 tests from [WILDCARD]/test/clear_timeout.ts
-test test 1 ... ok ([WILDCARD])
-test test 2 ... ok ([WILDCARD])
-test test 3 ... ok ([WILDCARD])
+running 3 tests from test/clear_timeout.ts
+test 1 ... ok ([WILDCARD])
+test 2 ... ok ([WILDCARD])
+test 3 ... ok ([WILDCARD])
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/collect.out b/cli/tests/testdata/test/collect.out
index 3bdada829..ef298021e 100644
--- a/cli/tests/testdata/test/collect.out
+++ b/cli/tests/testdata/test/collect.out
@@ -1,5 +1,5 @@
Check [WILDCARD]/test/collect/test.ts
-running 0 tests from [WILDCARD]/test/collect/test.ts
+running 0 tests from test/collect/test.ts
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/doc_only.out b/cli/tests/testdata/test/doc_only.out
index c2a91cae7..34babd1aa 100644
--- a/cli/tests/testdata/test/doc_only.out
+++ b/cli/tests/testdata/test/doc_only.out
@@ -1,5 +1,5 @@
Check [WILDCARD]/test/doc_only/mod.ts$2-5.ts
-running 0 tests from [WILDCARD]/test/doc_only/mod.ts
+running 0 tests from test/doc_only/mod.ts
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/exit_sanitizer.out b/cli/tests/testdata/test/exit_sanitizer.out
index f331d7a70..51e44ab57 100644
--- a/cli/tests/testdata/test/exit_sanitizer.out
+++ b/cli/tests/testdata/test/exit_sanitizer.out
@@ -1,24 +1,24 @@
Check [WILDCARD]/test/exit_sanitizer.ts
-running 3 tests from [WILDCARD]/test/exit_sanitizer.ts
-test exit(0) ... FAILED ([WILDCARD])
-test exit(1) ... FAILED ([WILDCARD])
-test exit(2) ... FAILED ([WILDCARD])
+running 3 tests from test/exit_sanitizer.ts
+exit(0) ... FAILED ([WILDCARD])
+exit(1) ... FAILED ([WILDCARD])
+exit(2) ... FAILED ([WILDCARD])
failures:
-exit(0)
+test/exit_sanitizer.ts > exit(0)
AssertionError: Test case attempted to exit with exit code: 0
at [WILDCARD]
at [WILDCARD]/test/exit_sanitizer.ts:2:8
at [WILDCARD]
-exit(1)
+test/exit_sanitizer.ts > exit(1)
AssertionError: Test case attempted to exit with exit code: 1
at [WILDCARD]
at [WILDCARD]/test/exit_sanitizer.ts:6:8
at [WILDCARD]
-exit(2)
+test/exit_sanitizer.ts > exit(2)
AssertionError: Test case attempted to exit with exit code: 2
at [WILDCARD]
at [WILDCARD]/test/exit_sanitizer.ts:10:8
@@ -26,6 +26,7 @@ AssertionError: Test case attempted to exit with exit code: 2
failures:
+ test/exit_sanitizer.ts
exit(0)
exit(1)
exit(2)
diff --git a/cli/tests/testdata/test/fail.out b/cli/tests/testdata/test/fail.out
index 66d471cdf..7c64ec929 100644
--- a/cli/tests/testdata/test/fail.out
+++ b/cli/tests/testdata/test/fail.out
@@ -1,70 +1,71 @@
Check [WILDCARD]/test/fail.ts
-running 10 tests from [WILDCARD]/test/fail.ts
-test test 0 ... FAILED ([WILDCARD])
-test test 1 ... FAILED ([WILDCARD])
-test test 2 ... FAILED ([WILDCARD])
-test test 3 ... FAILED ([WILDCARD])
-test test 4 ... FAILED ([WILDCARD])
-test test 5 ... FAILED ([WILDCARD])
-test test 6 ... FAILED ([WILDCARD])
-test test 7 ... FAILED ([WILDCARD])
-test test 8 ... FAILED ([WILDCARD])
-test test 9 ... FAILED ([WILDCARD])
+running 10 tests from test/fail.ts
+test 0 ... FAILED ([WILDCARD])
+test 1 ... FAILED ([WILDCARD])
+test 2 ... FAILED ([WILDCARD])
+test 3 ... FAILED ([WILDCARD])
+test 4 ... FAILED ([WILDCARD])
+test 5 ... FAILED ([WILDCARD])
+test 6 ... FAILED ([WILDCARD])
+test 7 ... FAILED ([WILDCARD])
+test 8 ... FAILED ([WILDCARD])
+test 9 ... FAILED ([WILDCARD])
failures:
-test 0
+test/fail.ts > test 0
Error
at [WILDCARD]/test/fail.ts:2:9
at [WILDCARD]
-test 1
+test/fail.ts > test 1
Error
at [WILDCARD]/test/fail.ts:5:9
at [WILDCARD]
-test 2
+test/fail.ts > test 2
Error
at [WILDCARD]/test/fail.ts:8:9
at [WILDCARD]
-test 3
+test/fail.ts > test 3
Error
at [WILDCARD]/test/fail.ts:11:9
at [WILDCARD]
-test 4
+test/fail.ts > test 4
Error
at [WILDCARD]/test/fail.ts:14:9
at [WILDCARD]
-test 5
+test/fail.ts > test 5
Error
at [WILDCARD]/test/fail.ts:17:9
at [WILDCARD]
-test 6
+test/fail.ts > test 6
Error
at [WILDCARD]/test/fail.ts:20:9
at [WILDCARD]
-test 7
+test/fail.ts > test 7
Error
at [WILDCARD]/test/fail.ts:23:9
at [WILDCARD]
-test 8
+test/fail.ts > test 8
Error
at [WILDCARD]/test/fail.ts:26:9
at [WILDCARD]
-test 9
+test/fail.ts > test 9
Error
at [WILDCARD]/test/fail.ts:29:9
at [WILDCARD]
failures:
+ test/fail.ts
test 0
test 1
test 2
diff --git a/cli/tests/testdata/test/fail_fast.out b/cli/tests/testdata/test/fail_fast.out
index c97f854fa..58e1e4e5a 100644
--- a/cli/tests/testdata/test/fail_fast.out
+++ b/cli/tests/testdata/test/fail_fast.out
@@ -1,16 +1,17 @@
Check [WILDCARD]/test/fail_fast.ts
-running 10 tests from [WILDCARD]/test/fail_fast.ts
-test test 1 ... FAILED ([WILDCARD])
+running 10 tests from test/fail_fast.ts
+test 1 ... FAILED ([WILDCARD])
failures:
-test 1
+test/fail_fast.ts > test 1
Error
at [WILDCARD]/test/fail_fast.ts:2:9
at [WILDCARD]
failures:
+ test/fail_fast.ts
test 1
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/filter.out b/cli/tests/testdata/test/filter.out
index 5cb150897..88196b6e0 100644
--- a/cli/tests/testdata/test/filter.out
+++ b/cli/tests/testdata/test/filter.out
@@ -1,12 +1,12 @@
Check [WILDCARD]/test/filter/a_test.ts
Check [WILDCARD]/test/filter/b_test.ts
Check [WILDCARD]/test/filter/c_test.ts
-running 1 test from [WILDCARD]/test/filter/a_test.ts
-test foo ... ok ([WILDCARD])
-running 1 test from [WILDCARD]/test/filter/b_test.ts
-test foo ... ok ([WILDCARD])
-running 1 test from [WILDCARD]/test/filter/c_test.ts
-test foo ... ok ([WILDCARD])
+running 1 test from test/filter/a_test.ts
+foo ... ok ([WILDCARD])
+running 1 test from test/filter/b_test.ts
+foo ... ok ([WILDCARD])
+running 1 test from test/filter/c_test.ts
+foo ... ok ([WILDCARD])
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/finally_timeout.out b/cli/tests/testdata/test/finally_timeout.out
index 570e9108f..aafb8125f 100644
--- a/cli/tests/testdata/test/finally_timeout.out
+++ b/cli/tests/testdata/test/finally_timeout.out
@@ -1,17 +1,18 @@
Check [WILDCARD]/test/finally_timeout.ts
-running 2 tests from [WILDCARD]/test/finally_timeout.ts
-test error ... FAILED ([WILDCARD])
-test success ... ok ([WILDCARD])
+running 2 tests from test/finally_timeout.ts
+error ... FAILED ([WILDCARD])
+success ... ok ([WILDCARD])
failures:
-error
+test/finally_timeout.ts > error
Error: fail
at [WILDCARD]/test/finally_timeout.ts:4:11
at [WILDCARD]
failures:
+ test/finally_timeout.ts
error
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/ignore.out b/cli/tests/testdata/test/ignore.out
index a7c68261d..44c8b657d 100644
--- a/cli/tests/testdata/test/ignore.out
+++ b/cli/tests/testdata/test/ignore.out
@@ -1,15 +1,15 @@
Check [WILDCARD]/test/ignore.ts
-running 10 tests from [WILDCARD]/test/ignore.ts
-test test 0 ... ignored ([WILDCARD])
-test test 1 ... ignored ([WILDCARD])
-test test 2 ... ignored ([WILDCARD])
-test test 3 ... ignored ([WILDCARD])
-test test 4 ... ignored ([WILDCARD])
-test test 5 ... ignored ([WILDCARD])
-test test 6 ... ignored ([WILDCARD])
-test test 7 ... ignored ([WILDCARD])
-test test 8 ... ignored ([WILDCARD])
-test test 9 ... ignored ([WILDCARD])
+running 10 tests from test/ignore.ts
+test 0 ... ignored ([WILDCARD])
+test 1 ... ignored ([WILDCARD])
+test 2 ... ignored ([WILDCARD])
+test 3 ... ignored ([WILDCARD])
+test 4 ... ignored ([WILDCARD])
+test 5 ... ignored ([WILDCARD])
+test 6 ... ignored ([WILDCARD])
+test 7 ... ignored ([WILDCARD])
+test 8 ... ignored ([WILDCARD])
+test 9 ... ignored ([WILDCARD])
test result: ok. 0 passed; 0 failed; 10 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/ignore_permissions.out b/cli/tests/testdata/test/ignore_permissions.out
index c4d273d8f..8f00a5b14 100644
--- a/cli/tests/testdata/test/ignore_permissions.out
+++ b/cli/tests/testdata/test/ignore_permissions.out
@@ -1,6 +1,6 @@
Check [WILDCARD]/test/ignore_permissions.ts
-running 1 test from [WILDCARD]/test/ignore_permissions.ts
-test ignore ... ignored ([WILDCARD])
+running 1 test from test/ignore_permissions.ts
+ignore ... ignored ([WILDCARD])
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/interval.out b/cli/tests/testdata/test/interval.out
index 024698dde..de5f2adad 100644
--- a/cli/tests/testdata/test/interval.out
+++ b/cli/tests/testdata/test/interval.out
@@ -1,5 +1,5 @@
Check [WILDCARD]/test/interval.ts
-running 0 tests from [WILDCARD]/test/interval.ts
+running 0 tests from test/interval.ts
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/load_unload.out b/cli/tests/testdata/test/load_unload.out
index b407ce122..b2e14bb7f 100644
--- a/cli/tests/testdata/test/load_unload.out
+++ b/cli/tests/testdata/test/load_unload.out
@@ -1,6 +1,6 @@
Check [WILDCARD]/test/load_unload.ts
-running 1 test from [WILDCARD]/test/load_unload.ts
-test test ... ok ([WILDCARD])
+running 1 test from test/load_unload.ts
+test ... ok ([WILDCARD])
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/meta.out b/cli/tests/testdata/test/meta.out
index a8c7acd63..6afb3bc0e 100644
--- a/cli/tests/testdata/test/meta.out
+++ b/cli/tests/testdata/test/meta.out
@@ -1,7 +1,7 @@
Check [WILDCARD]/test/meta.ts
import.meta.main: false
import.meta.url: [WILDCARD]/test/meta.ts
-running 0 tests from [WILDCARD]/test/meta.ts
+running 0 tests from test/meta.ts
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/no_prompt_by_default.out b/cli/tests/testdata/test/no_prompt_by_default.out
index e97badb18..28b073777 100644
--- a/cli/tests/testdata/test/no_prompt_by_default.out
+++ b/cli/tests/testdata/test/no_prompt_by_default.out
@@ -1,15 +1,16 @@
Check [WILDCARD]/no_prompt_by_default.ts
-running 1 test from [WILDCARD]/no_prompt_by_default.ts
-test no prompt ... FAILED ([WILDCARD]ms)
+running 1 test from test/no_prompt_by_default.ts
+no prompt ... FAILED ([WILDCARD]ms)
failures:
-no prompt
+test/no_prompt_by_default.ts > no prompt
PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag
[WILDCARD]
failures:
+ test/no_prompt_by_default.ts
no prompt
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]ms)
diff --git a/cli/tests/testdata/test/no_prompt_with_denied_perms.out b/cli/tests/testdata/test/no_prompt_with_denied_perms.out
index e8ff079c5..7551726df 100644
--- a/cli/tests/testdata/test/no_prompt_with_denied_perms.out
+++ b/cli/tests/testdata/test/no_prompt_with_denied_perms.out
@@ -1,15 +1,16 @@
Check [WILDCARD]/no_prompt_with_denied_perms.ts
-running 1 test from [WILDCARD]/no_prompt_with_denied_perms.ts
-test no prompt ... FAILED ([WILDCARD]ms)
+running 1 test from test/no_prompt_with_denied_perms.ts
+no prompt ... FAILED ([WILDCARD]ms)
failures:
-no prompt
+test/no_prompt_with_denied_perms.ts > no prompt
PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag
[WILDCARD]
failures:
+ test/no_prompt_with_denied_perms.ts
no prompt
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]ms)
diff --git a/cli/tests/testdata/test/only.out b/cli/tests/testdata/test/only.out
index dc78cae80..0003fb8c4 100644
--- a/cli/tests/testdata/test/only.out
+++ b/cli/tests/testdata/test/only.out
@@ -1,6 +1,6 @@
Check [WILDCARD]/test/only.ts
-running 1 test from [WILDCARD]/test/only.ts
-test only ... ok ([WILDCARD])
+running 1 test from test/only.ts
+only ... ok ([WILDCARD])
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/ops_sanitizer_missing_details.out b/cli/tests/testdata/test/ops_sanitizer_missing_details.out
index a6845e190..68c8c387a 100644
--- a/cli/tests/testdata/test/ops_sanitizer_missing_details.out
+++ b/cli/tests/testdata/test/ops_sanitizer_missing_details.out
@@ -1,10 +1,10 @@
Check [WILDCARD]test/ops_sanitizer_missing_details.ts
-running 1 test from [WILDCARD]test/ops_sanitizer_missing_details.ts
-test test 1 ... FAILED [WILDCARD]
+running 1 test from test/ops_sanitizer_missing_details.ts
+test 1 ... FAILED [WILDCARD]
failures:
-test 1
+test/ops_sanitizer_missing_details.ts > test 1
Test case is leaking async ops.
- 1 async operation to op_write was started in this test, but never completed.
@@ -13,6 +13,7 @@ To get more details where ops were leaked, run again with --trace-ops flag.
failures:
+ test/ops_sanitizer_missing_details.ts
test 1
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD]
diff --git a/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out b/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out
index acab794ab..e6004f7d2 100644
--- a/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out
+++ b/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out
@@ -1,11 +1,11 @@
Check [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
-running 2 tests from [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
-test test 1 ... FAILED ([WILDCARD])
-test test 2 ... FAILED ([WILDCARD])
+running 2 tests from test/ops_sanitizer_multiple_timeout_tests.ts
+test 1 ... FAILED ([WILDCARD])
+test 2 ... FAILED ([WILDCARD])
failures:
-test 1
+test/ops_sanitizer_multiple_timeout_tests.ts > test 1
Test case is leaking async ops.
- 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call. The operations were started here:
@@ -21,7 +21,7 @@ Test case is leaking async ops.
at [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts:8:27
at [WILDCARD]
-test 2
+test/ops_sanitizer_multiple_timeout_tests.ts > test 2
Test case is leaking async ops.
- 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call. The operations were started here:
@@ -39,6 +39,7 @@ Test case is leaking async ops.
failures:
+ test/ops_sanitizer_multiple_timeout_tests.ts
test 1
test 2
diff --git a/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests_no_trace.out b/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests_no_trace.out
index 9dad65525..61b210337 100644
--- a/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests_no_trace.out
+++ b/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests_no_trace.out
@@ -1,18 +1,18 @@
Check [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
-running 2 tests from [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
-test test 1 ... FAILED ([WILDCARD])
-test test 2 ... FAILED ([WILDCARD])
+running 2 tests from test/ops_sanitizer_multiple_timeout_tests.ts
+test 1 ... FAILED ([WILDCARD])
+test 2 ... FAILED ([WILDCARD])
failures:
-test 1
+test/ops_sanitizer_multiple_timeout_tests.ts > test 1
Test case is leaking async ops.
- 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call.
To get more details where ops were leaked, run again with --trace-ops flag.
-test 2
+test/ops_sanitizer_multiple_timeout_tests.ts > test 2
Test case is leaking async ops.
- 2 async operations to sleep for a duration were started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call.
@@ -21,6 +21,7 @@ To get more details where ops were leaked, run again with --trace-ops flag.
failures:
+ test/ops_sanitizer_multiple_timeout_tests.ts
test 1
test 2
diff --git a/cli/tests/testdata/test/ops_sanitizer_nexttick.out b/cli/tests/testdata/test/ops_sanitizer_nexttick.out
index 43a4915d0..767f068c4 100644
--- a/cli/tests/testdata/test/ops_sanitizer_nexttick.out
+++ b/cli/tests/testdata/test/ops_sanitizer_nexttick.out
@@ -1,7 +1,7 @@
Check [WILDCARD]/testdata/test/ops_sanitizer_nexttick.ts
-running 2 tests from [WILDCARD]/testdata/test/ops_sanitizer_nexttick.ts
-test test 1 ... ok ([WILDCARD])
-test test 2 ... ok ([WILDCARD])
+running 2 tests from test/ops_sanitizer_nexttick.ts
+test 1 ... ok ([WILDCARD])
+test 2 ... ok ([WILDCARD])
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/ops_sanitizer_timeout_failure.out b/cli/tests/testdata/test/ops_sanitizer_timeout_failure.out
index 81a1af63b..bb9187435 100644
--- a/cli/tests/testdata/test/ops_sanitizer_timeout_failure.out
+++ b/cli/tests/testdata/test/ops_sanitizer_timeout_failure.out
@@ -1,6 +1,6 @@
Check [WILDCARD]/testdata/test/ops_sanitizer_timeout_failure.ts
-running 1 test from [WILDCARD]/testdata/test/ops_sanitizer_timeout_failure.ts
-test wait ... ok ([WILDCARD])
+running 1 test from test/ops_sanitizer_timeout_failure.ts
+wait ... ok ([WILDCARD])
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/ops_sanitizer_unstable.out b/cli/tests/testdata/test/ops_sanitizer_unstable.out
index 84ea10501..b6a45cb20 100644
--- a/cli/tests/testdata/test/ops_sanitizer_unstable.out
+++ b/cli/tests/testdata/test/ops_sanitizer_unstable.out
@@ -1,11 +1,11 @@
Check [WILDCARD]/testdata/test/ops_sanitizer_unstable.ts
-running 2 tests from [WILDCARD]/testdata/test/ops_sanitizer_unstable.ts
-test no-op ... ok ([WILDCARD])
-test leak interval ... FAILED ([WILDCARD])
+running 2 tests from test/ops_sanitizer_unstable.ts
+no-op ... ok ([WILDCARD])
+leak interval ... FAILED ([WILDCARD])
failures:
-leak interval
+test/ops_sanitizer_unstable.ts > leak interval
Test case is leaking async ops.
- 1 async operation to sleep for a duration was started in this test, but never completed. This is often caused by not cancelling a `setTimeout` or `setInterval` call. The operation was started here:
@@ -16,6 +16,7 @@ Test case is leaking async ops.
failures:
+ test/ops_sanitizer_unstable.ts
leak interval
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/overloads.out b/cli/tests/testdata/test/overloads.out
index 13c088f6c..ddf4f0bb5 100644
--- a/cli/tests/testdata/test/overloads.out
+++ b/cli/tests/testdata/test/overloads.out
@@ -1,11 +1,11 @@
Check [WILDCARD]/test/overloads.ts
-running 6 tests from [WILDCARD]/test/overloads.ts
-test test0 ... ok ([WILDCARD])
-test test1 ... ok ([WILDCARD])
-test test2 ... ok ([WILDCARD])
-test test3 ... ok ([WILDCARD])
-test test4 ... ok ([WILDCARD])
-test test5 ... ignored ([WILDCARD])
+running 6 tests from test/overloads.ts
+test0 ... ok ([WILDCARD])
+test1 ... ok ([WILDCARD])
+test2 ... ok ([WILDCARD])
+test3 ... ok ([WILDCARD])
+test4 ... ok ([WILDCARD])
+test5 ... ignored ([WILDCARD])
test result: ok. 5 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/pass.out b/cli/tests/testdata/test/pass.out
index cf81ac2e7..c0e1c3384 100644
--- a/cli/tests/testdata/test/pass.out
+++ b/cli/tests/testdata/test/pass.out
@@ -1,15 +1,15 @@
Check [WILDCARD]/test/pass.ts
-running 10 tests from [WILDCARD]/test/pass.ts
-test test 0 ... ok ([WILDCARD])
-test test 1 ... ok ([WILDCARD])
-test test 2 ... ok ([WILDCARD])
-test test 3 ... ok ([WILDCARD])
-test test 4 ... ok ([WILDCARD])
-test test 5 ... ok ([WILDCARD])
-test test 6 ... ok ([WILDCARD])
-test test 7 ... ok ([WILDCARD])
-test test 8 ... ok ([WILDCARD])
-test test 9 ... ok ([WILDCARD])
+running 10 tests from test/pass.ts
+test 0 ... ok ([WILDCARD])
+test 1 ... ok ([WILDCARD])
+test 2 ... ok ([WILDCARD])
+test 3 ... ok ([WILDCARD])
+test 4 ... ok ([WILDCARD])
+test 5 ... ok ([WILDCARD])
+test 6 ... ok ([WILDCARD])
+test 7 ... ok ([WILDCARD])
+test 8 ... ok ([WILDCARD])
+test 9 ... ok ([WILDCARD])
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/quiet.out b/cli/tests/testdata/test/quiet.out
index 05302fb2c..d5828fb63 100644
--- a/cli/tests/testdata/test/quiet.out
+++ b/cli/tests/testdata/test/quiet.out
@@ -1,8 +1,8 @@
-running 4 tests from [WILDCARD]/test/quiet.ts
-test console.log ... ok ([WILDCARD])
-test console.error ... ok ([WILDCARD])
-test console.info ... ok ([WILDCARD])
-test console.warn ... ok ([WILDCARD])
+running 4 tests from test/quiet.ts
+console.log ... ok ([WILDCARD])
+console.error ... ok ([WILDCARD])
+console.info ... ok ([WILDCARD])
+console.warn ... ok ([WILDCARD])
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/resource_sanitizer.out b/cli/tests/testdata/test/resource_sanitizer.out
index 632b75292..55ee74506 100644
--- a/cli/tests/testdata/test/resource_sanitizer.out
+++ b/cli/tests/testdata/test/resource_sanitizer.out
@@ -1,10 +1,10 @@
Check [WILDCARD]/test/resource_sanitizer.ts
-running 1 test from [WILDCARD]/test/resource_sanitizer.ts
-test leak ... FAILED ([WILDCARD])
+running 1 test from test/resource_sanitizer.ts
+leak ... FAILED ([WILDCARD])
failures:
-leak
+test/resource_sanitizer.ts > leak
AssertionError: Test case is leaking 2 resources:
- The stdin pipe (rid 0) was opened before the test started, but was closed during the test. Do not close resources in a test that were not created during that test.
@@ -14,6 +14,7 @@ AssertionError: Test case is leaking 2 resources:
failures:
+ test/resource_sanitizer.ts
leak
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/shuffle.out b/cli/tests/testdata/test/shuffle.out
index ec2f9692d..4ac8525be 100644
--- a/cli/tests/testdata/test/shuffle.out
+++ b/cli/tests/testdata/test/shuffle.out
@@ -1,39 +1,39 @@
Check [WILDCARD]/test/shuffle/bar_test.ts
Check [WILDCARD]/test/shuffle/baz_test.ts
Check [WILDCARD]/test/shuffle/foo_test.ts
-running 10 tests from [WILDCARD]/test/shuffle/foo_test.ts
-test test 2 ... ok ([WILDCARD])
-test test 3 ... ok ([WILDCARD])
-test test 6 ... ok ([WILDCARD])
-test test 9 ... ok ([WILDCARD])
-test test 8 ... ok ([WILDCARD])
-test test 7 ... ok ([WILDCARD])
-test test 5 ... ok ([WILDCARD])
-test test 4 ... ok ([WILDCARD])
-test test 1 ... ok ([WILDCARD])
-test test 0 ... ok ([WILDCARD])
-running 10 tests from [WILDCARD]/test/shuffle/baz_test.ts
-test test 2 ... ok ([WILDCARD])
-test test 3 ... ok ([WILDCARD])
-test test 6 ... ok ([WILDCARD])
-test test 9 ... ok ([WILDCARD])
-test test 8 ... ok ([WILDCARD])
-test test 7 ... ok ([WILDCARD])
-test test 5 ... ok ([WILDCARD])
-test test 4 ... ok ([WILDCARD])
-test test 1 ... ok ([WILDCARD])
-test test 0 ... ok ([WILDCARD])
-running 10 tests from [WILDCARD]/test/shuffle/bar_test.ts
-test test 2 ... ok ([WILDCARD])
-test test 3 ... ok ([WILDCARD])
-test test 6 ... ok ([WILDCARD])
-test test 9 ... ok ([WILDCARD])
-test test 8 ... ok ([WILDCARD])
-test test 7 ... ok ([WILDCARD])
-test test 5 ... ok ([WILDCARD])
-test test 4 ... ok ([WILDCARD])
-test test 1 ... ok ([WILDCARD])
-test test 0 ... ok ([WILDCARD])
+running 10 tests from test/shuffle/foo_test.ts
+test 2 ... ok ([WILDCARD])
+test 3 ... ok ([WILDCARD])
+test 6 ... ok ([WILDCARD])
+test 9 ... ok ([WILDCARD])
+test 8 ... ok ([WILDCARD])
+test 7 ... ok ([WILDCARD])
+test 5 ... ok ([WILDCARD])
+test 4 ... ok ([WILDCARD])
+test 1 ... ok ([WILDCARD])
+test 0 ... ok ([WILDCARD])
+running 10 tests from test/shuffle/baz_test.ts
+test 2 ... ok ([WILDCARD])
+test 3 ... ok ([WILDCARD])
+test 6 ... ok ([WILDCARD])
+test 9 ... ok ([WILDCARD])
+test 8 ... ok ([WILDCARD])
+test 7 ... ok ([WILDCARD])
+test 5 ... ok ([WILDCARD])
+test 4 ... ok ([WILDCARD])
+test 1 ... ok ([WILDCARD])
+test 0 ... ok ([WILDCARD])
+running 10 tests from test/shuffle/bar_test.ts
+test 2 ... ok ([WILDCARD])
+test 3 ... ok ([WILDCARD])
+test 6 ... ok ([WILDCARD])
+test 9 ... ok ([WILDCARD])
+test 8 ... ok ([WILDCARD])
+test 7 ... ok ([WILDCARD])
+test 5 ... ok ([WILDCARD])
+test 4 ... ok ([WILDCARD])
+test 1 ... ok ([WILDCARD])
+test 0 ... ok ([WILDCARD])
test result: ok. 30 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tests/testdata/test/steps/failing_steps.out b/cli/tests/testdata/test/steps/failing_steps.out
index 6fad8078b..0724da178 100644
--- a/cli/tests/testdata/test/steps/failing_steps.out
+++ b/cli/tests/testdata/test/steps/failing_steps.out
@@ -1,25 +1,25 @@
[WILDCARD]
-running 3 tests from [WILDCARD]/failing_steps.ts
-test nested failure ...
- test step 1 ...
- test inner 1 ... FAILED ([WILDCARD])
+running 3 tests from test/steps/failing_steps.ts
+nested failure ...
+ step 1 ...
+ inner 1 ... FAILED ([WILDCARD])
Error: Failed.
at [WILDCARD]/failing_steps.ts:[WILDCARD]
[WILDCARD]
- test inner 2 ... ok ([WILDCARD])
+ inner 2 ... ok ([WILDCARD])
FAILED ([WILDCARD])
FAILED ([WILDCARD])
-test multiple test step failures ...
- test step 1 ... FAILED ([WILDCARD])
+multiple test step failures ...
+ step 1 ... FAILED ([WILDCARD])
Error: Fail.
[WILDCARD]
- test step 2 ... FAILED ([WILDCARD])
+ step 2 ... FAILED ([WILDCARD])
Error: Fail.
at [WILDCARD]/failing_steps.ts:[WILDCARD]
[WILDCARD]
FAILED ([WILDCARD])
-test failing step in failing test ...
- test step 1 ... FAILED ([WILDCARD])
+failing step in failing test ...
+ step 1 ... FAILED ([WILDCARD])
Error: Fail.
at [WILDCARD]/failing_steps.ts:[WILDCARD]
at [WILDCARD]
@@ -27,23 +27,24 @@ FAILED ([WILDCARD])
failures:
-nested failure
+test/steps/failing_steps.ts > nested failure
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])
-multiple test step failures
+test/steps/failing_steps.ts > multiple test step failures
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])
-failing step in failing test
+test/steps/failing_steps.ts > failing step in failing test
Error: Fail test.
at [WILDCARD]/failing_steps.ts:[WILDCARD]
at [WILDCARD]
failures:
+ test/steps/failing_steps.ts
nested failure
multiple test step failures
failing step in failing test
diff --git a/cli/tests/testdata/test/steps/ignored_steps.out b/cli/tests/testdata/test/steps/ignored_steps.out
index c71c603b3..a045574bb 100644
--- a/cli/tests/testdata/test/steps/ignored_steps.out
+++ b/cli/tests/testdata/test/steps/ignored_steps.out
@@ -1,8 +1,8 @@
[WILDCARD]
-running 1 test from [WILDCARD]/ignored_steps.ts
-test ignored step ...
- test step 1 ... ignored ([WILDCARD])
- test step 2 ... ok ([WILDCARD])
+running 1 test from test/steps/ignored_steps.ts
+ignored step ...
+ step 1 ... ignored ([WILDCARD])
+ step 2 ... ok ([WILDCARD])
ok ([WILDCARD])
test result: ok. 1 passed (1 step); 0 failed; 0 ignored (1 step); 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 6eba626b6..f64f148b7 100644
--- a/cli/tests/testdata/test/steps/invalid_usage.out
+++ b/cli/tests/testdata/test/steps/invalid_usage.out
@@ -1,14 +1,14 @@
[WILDCARD]
-running 7 tests from [WILDCARD]/invalid_usage.ts
-test capturing ...
- test some step ... ok ([WILDCARD])
+running 7 tests from test/steps/invalid_usage.ts
+capturing ...
+ some step ... ok ([WILDCARD])
FAILED ([WILDCARD])
-test top level missing await ...
- test step ... pending ([WILDCARD])
+top level missing await ...
+ step ... pending ([WILDCARD])
FAILED ([WILDCARD])
-test inner missing await ...
- test step ...
- test inner ... pending ([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(...)`).
at postValidation [WILDCARD]
at testStepSanitizer [WILDCARD]
@@ -19,9 +19,9 @@ test inner missing await ...
at async fn ([WILDCARD]/invalid_usage.ts:[WILDCARD])
at async Object.testStepSanitizer [WILDCARD]
FAILED ([WILDCARD])
-test parallel steps with sanitizers ...
- test step 1 ... pending ([WILDCARD])
- test step 2 ... 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.
* parallel steps with sanitizers > step 1
at preValidation ([WILDCARD])
@@ -29,9 +29,9 @@ test parallel steps with sanitizers ...
at [WILDCARD]/invalid_usage.ts:[WILDCARD]
at [WILDCARD]
FAILED ([WILDCARD])
-test parallel steps when first has sanitizer ...
- test step 1 ... pending ([WILDCARD])
- test step 2 ... 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.
* parallel steps when first has sanitizer > step 1
at preValidation ([WILDCARD])
@@ -39,9 +39,9 @@ test parallel steps when first has sanitizer ...
at [WILDCARD]/invalid_usage.ts:[WILDCARD]
at [WILDCARD]
FAILED ([WILDCARD])
-test parallel steps when second has sanitizer ...
- test step 1 ... ok ([WILDCARD])
- test step 2 ... 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.
* parallel steps when second has sanitizer > step 1
at preValidation ([WILDCARD])
@@ -49,12 +49,12 @@ test parallel steps when second has sanitizer ...
at [WILDCARD]/invalid_usage.ts:[WILDCARD]
at [WILDCARD]
FAILED ([WILDCARD])
-test parallel steps where only inner tests have sanitizers ...
- test step 1 ...
- test step inner ... ok ([WILDCARD])
+parallel steps where only inner tests have sanitizers ...
+ step 1 ...
+ step inner ... ok ([WILDCARD])
ok ([WILDCARD])
- test step 2 ...
- test step inner ... FAILED ([WILDCARD])
+ step 2 ...
+ step inner ... FAILED ([WILDCARD])
Error: Cannot start test step with sanitizers while another test step is running.
* parallel steps where only inner tests have sanitizers > step 1
at preValidation ([WILDCARD])
@@ -65,40 +65,41 @@ FAILED ([WILDCARD])
failures:
-capturing
+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.
at TestContext.step ([WILDCARD])
at [WILDCARD]/invalid_usage.ts:[WILDCARD]
at [WILDCARD]
-top level missing await
+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(...)`).
at postValidation [WILDCARD]
at testStepSanitizer ([WILDCARD])
[WILDCARD]
-inner missing await
+test/steps/invalid_usage.ts > inner missing await
Error: 1 test step failed.
at [WILDCARD]
-parallel steps with sanitizers
+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(...)`).
at postValidation [WILDCARD]
at testStepSanitizer ([WILDCARD])
[WILDCARD]
-parallel steps when first has sanitizer
+test/steps/invalid_usage.ts > parallel steps when first has sanitizer
Error: 1 test step failed.
at runTest ([WILDCARD])
at [WILDCARD]
-parallel steps when second has sanitizer
+test/steps/invalid_usage.ts > parallel steps when second has sanitizer
Error: 1 test step failed.
at runTest ([WILDCARD])
at [WILDCARD]
failures:
+ test/steps/invalid_usage.ts
capturing
top level missing await
inner missing await
diff --git a/cli/tests/testdata/test/steps/passing_steps.out b/cli/tests/testdata/test/steps/passing_steps.out
index 99834d675..4d876b7d5 100644
--- a/cli/tests/testdata/test/steps/passing_steps.out
+++ b/cli/tests/testdata/test/steps/passing_steps.out
@@ -1,38 +1,38 @@
[WILDCARD]
-running 5 tests from [WILDCARD]
-test description ...
- test step 1 ...
- test inner 1 ... ok ([WILDCARD]ms)
- test inner 2 ... ok ([WILDCARD]ms)
+running 5 tests from test/steps/passing_steps.ts
+description ...
+ step 1 ...
+ inner 1 ... ok ([WILDCARD]ms)
+ inner 2 ... ok ([WILDCARD]ms)
ok ([WILDCARD]ms)
ok ([WILDCARD]ms)
-test parallel steps without sanitizers ...
- test step 1 ... ok ([WILDCARD])
- test step 2 ... ok ([WILDCARD])
+parallel steps without sanitizers ...
+ step 1 ... ok ([WILDCARD])
+ step 2 ... ok ([WILDCARD])
ok ([WILDCARD])
-test parallel steps without sanitizers due to parent ...
- test step 1 ... ok ([WILDCARD])
- test step 2 ... ok ([WILDCARD])
+parallel steps without sanitizers due to parent ...
+ step 1 ... ok ([WILDCARD])
+ step 2 ... ok ([WILDCARD])
ok ([WILDCARD])
-test steps with disabled sanitizers, then enabled, then parallel disabled ...
- test step 1 ...
- test step 1 ...
- test step 1 ...
- test step 1 ... ok ([WILDCARD])
- test step 1 ... ok ([WILDCARD])
+steps with disabled sanitizers, then enabled, then parallel disabled ...
+ step 1 ...
+ step 1 ...
+ step 1 ...
+ step 1 ... ok ([WILDCARD])
+ step 1 ... ok ([WILDCARD])
ok ([WILDCARD])
- test step 2 ... ok ([WILDCARD])
+ step 2 ... ok ([WILDCARD])
ok ([WILDCARD])
ok ([WILDCARD])
ok ([WILDCARD])
-test steps buffered then streaming reporting ...
- test step 1 ...
- test step 1 - 1 ... ok ([WILDCARD])
- test step 1 - 2 ...
- test step 1 - 2 - 1 ... ok ([WILDCARD])
+steps buffered then streaming reporting ...
+ step 1 ...
+ step 1 - 1 ... ok ([WILDCARD])
+ step 1 - 2 ...
+ step 1 - 2 - 1 ... ok ([WILDCARD])
ok ([WILDCARD])
ok ([WILDCARD])
- test step 2 ... ok ([WILDCARD])
+ step 2 ... ok ([WILDCARD])
ok ([WILDCARD])
test result: ok. 5 passed (18 steps); 0 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD]
diff --git a/cli/tests/testdata/test/text.out b/cli/tests/testdata/test/text.out
index b09b04c05..384bce42e 100644
--- a/cli/tests/testdata/test/text.out
+++ b/cli/tests/testdata/test/text.out
@@ -1,4 +1,4 @@
-running 0 tests from [WILDCARD]/test/text.md
+running 0 tests from test/text.md
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
diff --git a/cli/tools/test.rs b/cli/tools/test.rs
index 96ee3ab6e..00317794f 100644
--- a/cli/tools/test.rs
+++ b/cli/tools/test.rs
@@ -35,6 +35,7 @@ use deno_core::futures::stream;
use deno_core::futures::FutureExt;
use deno_core::futures::StreamExt;
use deno_core::serde_json::json;
+use deno_core::url::Url;
use deno_core::ModuleSpecifier;
use deno_graph::ModuleKind;
use deno_runtime::permissions::Permissions;
@@ -45,6 +46,7 @@ use rand::seq::SliceRandom;
use rand::SeedableRng;
use regex::Regex;
use serde::Deserialize;
+use std::collections::BTreeMap;
use std::collections::HashMap;
use std::collections::HashSet;
use std::io::Write;
@@ -218,6 +220,7 @@ struct PrettyTestReporter {
echo_output: bool,
deferred_step_output: HashMap<TestDescription, Vec<DeferredStepOutput>>,
last_wait_output_level: usize,
+ cwd: Url,
}
impl PrettyTestReporter {
@@ -227,25 +230,31 @@ impl PrettyTestReporter {
echo_output,
deferred_step_output: HashMap::new(),
last_wait_output_level: 0,
+ cwd: Url::from_directory_path(std::env::current_dir().unwrap()).unwrap(),
}
}
fn force_report_wait(&mut self, description: &TestDescription) {
- print!("test {} ...", description.name);
+ print!("{} ...", description.name);
// flush for faster feedback when line buffered
std::io::stdout().flush().unwrap();
self.last_wait_output_level = 0;
}
+ fn to_relative_path_or_remote_url(&self, path_or_url: &str) -> String {
+ let url = Url::parse(path_or_url).unwrap();
+ if url.scheme() == "file" {
+ self.cwd.make_relative(&url).unwrap()
+ } else {
+ path_or_url.to_string()
+ }
+ }
+
fn force_report_step_wait(&mut self, description: &TestStepDescription) {
if self.last_wait_output_level < description.level {
println!();
}
- print!(
- "{}test {} ...",
- " ".repeat(description.level),
- description.name
- );
+ print!("{}{} ...", " ".repeat(description.level), description.name);
// flush for faster feedback when line buffered
std::io::stdout().flush().unwrap();
self.last_wait_output_level = description.level;
@@ -287,7 +296,15 @@ impl PrettyTestReporter {
impl TestReporter for PrettyTestReporter {
fn report_plan(&mut self, plan: &TestPlan) {
let inflection = if plan.total == 1 { "test" } else { "tests" };
- println!("running {} {} from {}", plan.total, inflection, plan.origin);
+ println!(
+ "{}",
+ colors::gray(format!(
+ "running {} {} from {}",
+ plan.total,
+ inflection,
+ self.to_relative_path_or_remote_url(&plan.origin)
+ ))
+ );
}
fn report_wait(&mut self, description: &TestDescription) {
@@ -388,14 +405,36 @@ impl TestReporter for PrettyTestReporter {
if !summary.failures.is_empty() {
println!("\nfailures:\n");
for (description, error) in &summary.failures {
- println!("{}", description.name);
+ println!(
+ "{} {} {}",
+ colors::gray(
+ self.to_relative_path_or_remote_url(&description.origin)
+ ),
+ colors::gray(">"),
+ description.name
+ );
println!("{}", error);
println!();
}
- println!("failures:\n");
+ let mut grouped_by_origin: BTreeMap<String, Vec<String>> =
+ BTreeMap::default();
for (description, _) in &summary.failures {
- println!("\t{}", description.name);
+ let test_names = grouped_by_origin
+ .entry(description.origin.clone())
+ .or_default();
+ test_names.push(description.name.clone());
+ }
+
+ println!("failures:\n");
+ for (origin, test_names) in &grouped_by_origin {
+ println!(
+ "\t{}",
+ colors::gray(self.to_relative_path_or_remote_url(origin))
+ );
+ for test_name in test_names {
+ println!("\t{}", test_name);
+ }
}
}