0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 17:34:47 -05:00

feat(test): Improve testing report output (#14255)

Following changes were done in this commit:

- remove "test" prefix before each test
- use gray color for "running N tests from ..." prompt
- use relative path or remote URL instead of full URL in "running N tests from ..." prompt
- in "failures" section, add file path/remote URL before the test name

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
This commit is contained in:
Bartek Iwańczuk 2022-04-11 18:27:17 +02:00 committed by GitHub
parent c154ac5168
commit c8313a7457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 333 additions and 277 deletions

View file

@ -13,9 +13,9 @@ fn no_color() {
false, false,
); );
// ANSI escape codes should be stripped. // ANSI escape codes should be stripped.
assert!(out.contains("test success ... ok")); assert!(out.contains("success ... ok"));
assert!(out.contains("test fail ... FAILED")); assert!(out.contains("fail ... FAILED"));
assert!(out.contains("test ignored ... ignored")); assert!(out.contains("ignored ... ignored"));
assert!(out.contains("test result: FAILED. 1 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out")); assert!(out.contains("test result: FAILED. 1 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out"));
} }

View file

@ -1,10 +1,10 @@
running 2 tests from [WILDCARD] running 2 tests from compat/test_runner/cjs.js
test Correct assertion ... ok ([WILDCARD]) Correct assertion ... ok ([WILDCARD])
test Failed assertion ... FAILED ([WILDCARD]) Failed assertion ... FAILED ([WILDCARD])
failures: failures:
Failed assertion compat/test_runner/cjs.js > Failed assertion
AssertionError [ERR_ASSERTION]: Values are not strictly equal: AssertionError [ERR_ASSERTION]: Values are not strictly equal:
@ -18,7 +18,8 @@ AssertionError [ERR_ASSERTION]: Values are not strictly equal:
failures: 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]) test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,10 +1,10 @@
running 2 tests from [WILDCARD] running 2 tests from compat/test_runner/esm.mjs
test Correct assertion ... ok ([WILDCARD]) Correct assertion ... ok ([WILDCARD])
test Failed assertion ... FAILED ([WILDCARD]) Failed assertion ... FAILED ([WILDCARD])
failures: failures:
Failed assertion compat/test_runner/esm.mjs > Failed assertion
AssertionError [ERR_ASSERTION]: Values are not strictly equal: AssertionError [ERR_ASSERTION]: Values are not strictly equal:
@ -18,7 +18,8 @@ AssertionError [ERR_ASSERTION]: Values are not strictly equal:
failures: 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]) test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,10 +1,10 @@
Check [WILDCARD]/testdata/test/aggregate_error.ts Check [WILDCARD]/testdata/test/aggregate_error.ts
running 1 test from [WILDCARD]/testdata/test/aggregate_error.ts running 1 test from test/aggregate_error.ts
test aggregate ... FAILED ([WILDCARD]) aggregate ... FAILED ([WILDCARD])
failures: failures:
aggregate test/aggregate_error.ts > aggregate
AggregateError AggregateError
Error: Error 1 Error: Error 1
at [WILDCARD]/testdata/test/aggregate_error.ts:2:18 at [WILDCARD]/testdata/test/aggregate_error.ts:2:18
@ -17,6 +17,7 @@ AggregateError
failures: failures:
test/aggregate_error.ts
aggregate aggregate
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,18 +1,18 @@
[WILDCARD] [WILDCARD]
running 14 tests from [WILDCARD] running 14 tests from [WILDCARD]
test read false ... ok [WILDCARD] read false ... ok [WILDCARD]
test read true ... ok [WILDCARD] read true ... ok [WILDCARD]
test write false ... ok [WILDCARD] write false ... ok [WILDCARD]
test write true ... ok [WILDCARD] write true ... ok [WILDCARD]
test net false ... ok [WILDCARD] net false ... ok [WILDCARD]
test net true ... ok [WILDCARD] net true ... ok [WILDCARD]
test env false ... ok [WILDCARD] env false ... ok [WILDCARD]
test env true ... ok [WILDCARD] env true ... ok [WILDCARD]
test run false ... ok [WILDCARD] run false ... ok [WILDCARD]
test run true ... ok [WILDCARD] run true ... ok [WILDCARD]
test ffi false ... ok [WILDCARD] ffi false ... ok [WILDCARD]
test ffi true ... ok [WILDCARD] ffi true ... ok [WILDCARD]
test hrtime false ... ok [WILDCARD] hrtime false ... ok [WILDCARD]
test hrtime true ... ok [WILDCARD] hrtime true ... ok [WILDCARD]
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD] test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD]

View file

@ -1,45 +1,46 @@
[WILDCARD] [WILDCARD]
running 7 tests from [WILDCARD] running 7 tests from [WILDCARD]
test read ... FAILED [WILDCARD] read ... FAILED [WILDCARD]
test write ... FAILED [WILDCARD] write ... FAILED [WILDCARD]
test net ... FAILED [WILDCARD] net ... FAILED [WILDCARD]
test env ... FAILED [WILDCARD] env ... FAILED [WILDCARD]
test run ... FAILED [WILDCARD] run ... FAILED [WILDCARD]
test ffi ... FAILED [WILDCARD] ffi ... FAILED [WILDCARD]
test hrtime ... FAILED [WILDCARD] hrtime ... FAILED [WILDCARD]
failures: failures:
read test/allow_none.ts > read
PermissionDenied: Can't escalate parent thread permissions PermissionDenied: Can't escalate parent thread permissions
[WILDCARD] [WILDCARD]
write test/allow_none.ts > write
PermissionDenied: Can't escalate parent thread permissions PermissionDenied: Can't escalate parent thread permissions
[WILDCARD] [WILDCARD]
net test/allow_none.ts > net
PermissionDenied: Can't escalate parent thread permissions PermissionDenied: Can't escalate parent thread permissions
[WILDCARD] [WILDCARD]
env test/allow_none.ts > env
PermissionDenied: Can't escalate parent thread permissions PermissionDenied: Can't escalate parent thread permissions
[WILDCARD] [WILDCARD]
run test/allow_none.ts > run
PermissionDenied: Can't escalate parent thread permissions PermissionDenied: Can't escalate parent thread permissions
[WILDCARD] [WILDCARD]
ffi test/allow_none.ts > ffi
PermissionDenied: Can't escalate parent thread permissions PermissionDenied: Can't escalate parent thread permissions
[WILDCARD] [WILDCARD]
hrtime test/allow_none.ts > hrtime
PermissionDenied: Can't escalate parent thread permissions PermissionDenied: Can't escalate parent thread permissions
[WILDCARD] [WILDCARD]
failures: failures:
test/allow_none.ts
read read
write write
net net

View file

@ -1,8 +1,8 @@
Check [WILDCARD]/test/clear_timeout.ts Check [WILDCARD]/test/clear_timeout.ts
running 3 tests from [WILDCARD]/test/clear_timeout.ts running 3 tests from test/clear_timeout.ts
test test 1 ... ok ([WILDCARD]) test 1 ... ok ([WILDCARD])
test test 2 ... ok ([WILDCARD]) test 2 ... ok ([WILDCARD])
test test 3 ... ok ([WILDCARD]) test 3 ... ok ([WILDCARD])
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,5 +1,5 @@
Check [WILDCARD]/test/collect/test.ts 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]) test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,5 +1,5 @@
Check [WILDCARD]/test/doc_only/mod.ts$2-5.ts 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]) test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,24 +1,24 @@
Check [WILDCARD]/test/exit_sanitizer.ts Check [WILDCARD]/test/exit_sanitizer.ts
running 3 tests from [WILDCARD]/test/exit_sanitizer.ts running 3 tests from test/exit_sanitizer.ts
test exit(0) ... FAILED ([WILDCARD]) exit(0) ... FAILED ([WILDCARD])
test exit(1) ... FAILED ([WILDCARD]) exit(1) ... FAILED ([WILDCARD])
test exit(2) ... FAILED ([WILDCARD]) exit(2) ... FAILED ([WILDCARD])
failures: failures:
exit(0) test/exit_sanitizer.ts > exit(0)
AssertionError: Test case attempted to exit with exit code: 0 AssertionError: Test case attempted to exit with exit code: 0
at [WILDCARD] at [WILDCARD]
at [WILDCARD]/test/exit_sanitizer.ts:2:8 at [WILDCARD]/test/exit_sanitizer.ts:2:8
at [WILDCARD] at [WILDCARD]
exit(1) test/exit_sanitizer.ts > exit(1)
AssertionError: Test case attempted to exit with exit code: 1 AssertionError: Test case attempted to exit with exit code: 1
at [WILDCARD] at [WILDCARD]
at [WILDCARD]/test/exit_sanitizer.ts:6:8 at [WILDCARD]/test/exit_sanitizer.ts:6:8
at [WILDCARD] at [WILDCARD]
exit(2) test/exit_sanitizer.ts > exit(2)
AssertionError: Test case attempted to exit with exit code: 2 AssertionError: Test case attempted to exit with exit code: 2
at [WILDCARD] at [WILDCARD]
at [WILDCARD]/test/exit_sanitizer.ts:10:8 at [WILDCARD]/test/exit_sanitizer.ts:10:8
@ -26,6 +26,7 @@ AssertionError: Test case attempted to exit with exit code: 2
failures: failures:
test/exit_sanitizer.ts
exit(0) exit(0)
exit(1) exit(1)
exit(2) exit(2)

View file

@ -1,70 +1,71 @@
Check [WILDCARD]/test/fail.ts Check [WILDCARD]/test/fail.ts
running 10 tests from [WILDCARD]/test/fail.ts running 10 tests from test/fail.ts
test test 0 ... FAILED ([WILDCARD]) test 0 ... FAILED ([WILDCARD])
test test 1 ... FAILED ([WILDCARD]) test 1 ... FAILED ([WILDCARD])
test test 2 ... FAILED ([WILDCARD]) test 2 ... FAILED ([WILDCARD])
test test 3 ... FAILED ([WILDCARD]) test 3 ... FAILED ([WILDCARD])
test test 4 ... FAILED ([WILDCARD]) test 4 ... FAILED ([WILDCARD])
test test 5 ... FAILED ([WILDCARD]) test 5 ... FAILED ([WILDCARD])
test test 6 ... FAILED ([WILDCARD]) test 6 ... FAILED ([WILDCARD])
test test 7 ... FAILED ([WILDCARD]) test 7 ... FAILED ([WILDCARD])
test test 8 ... FAILED ([WILDCARD]) test 8 ... FAILED ([WILDCARD])
test test 9 ... FAILED ([WILDCARD]) test 9 ... FAILED ([WILDCARD])
failures: failures:
test 0 test/fail.ts > test 0
Error Error
at [WILDCARD]/test/fail.ts:2:9 at [WILDCARD]/test/fail.ts:2:9
at [WILDCARD] at [WILDCARD]
test 1 test/fail.ts > test 1
Error Error
at [WILDCARD]/test/fail.ts:5:9 at [WILDCARD]/test/fail.ts:5:9
at [WILDCARD] at [WILDCARD]
test 2 test/fail.ts > test 2
Error Error
at [WILDCARD]/test/fail.ts:8:9 at [WILDCARD]/test/fail.ts:8:9
at [WILDCARD] at [WILDCARD]
test 3 test/fail.ts > test 3
Error Error
at [WILDCARD]/test/fail.ts:11:9 at [WILDCARD]/test/fail.ts:11:9
at [WILDCARD] at [WILDCARD]
test 4 test/fail.ts > test 4
Error Error
at [WILDCARD]/test/fail.ts:14:9 at [WILDCARD]/test/fail.ts:14:9
at [WILDCARD] at [WILDCARD]
test 5 test/fail.ts > test 5
Error Error
at [WILDCARD]/test/fail.ts:17:9 at [WILDCARD]/test/fail.ts:17:9
at [WILDCARD] at [WILDCARD]
test 6 test/fail.ts > test 6
Error Error
at [WILDCARD]/test/fail.ts:20:9 at [WILDCARD]/test/fail.ts:20:9
at [WILDCARD] at [WILDCARD]
test 7 test/fail.ts > test 7
Error Error
at [WILDCARD]/test/fail.ts:23:9 at [WILDCARD]/test/fail.ts:23:9
at [WILDCARD] at [WILDCARD]
test 8 test/fail.ts > test 8
Error Error
at [WILDCARD]/test/fail.ts:26:9 at [WILDCARD]/test/fail.ts:26:9
at [WILDCARD] at [WILDCARD]
test 9 test/fail.ts > test 9
Error Error
at [WILDCARD]/test/fail.ts:29:9 at [WILDCARD]/test/fail.ts:29:9
at [WILDCARD] at [WILDCARD]
failures: failures:
test/fail.ts
test 0 test 0
test 1 test 1
test 2 test 2

View file

@ -1,16 +1,17 @@
Check [WILDCARD]/test/fail_fast.ts Check [WILDCARD]/test/fail_fast.ts
running 10 tests from [WILDCARD]/test/fail_fast.ts running 10 tests from test/fail_fast.ts
test test 1 ... FAILED ([WILDCARD]) test 1 ... FAILED ([WILDCARD])
failures: failures:
test 1 test/fail_fast.ts > test 1
Error Error
at [WILDCARD]/test/fail_fast.ts:2:9 at [WILDCARD]/test/fail_fast.ts:2:9
at [WILDCARD] at [WILDCARD]
failures: failures:
test/fail_fast.ts
test 1 test 1
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,12 +1,12 @@
Check [WILDCARD]/test/filter/a_test.ts Check [WILDCARD]/test/filter/a_test.ts
Check [WILDCARD]/test/filter/b_test.ts Check [WILDCARD]/test/filter/b_test.ts
Check [WILDCARD]/test/filter/c_test.ts Check [WILDCARD]/test/filter/c_test.ts
running 1 test from [WILDCARD]/test/filter/a_test.ts running 1 test from test/filter/a_test.ts
test foo ... ok ([WILDCARD]) foo ... ok ([WILDCARD])
running 1 test from [WILDCARD]/test/filter/b_test.ts running 1 test from test/filter/b_test.ts
test foo ... ok ([WILDCARD]) foo ... ok ([WILDCARD])
running 1 test from [WILDCARD]/test/filter/c_test.ts running 1 test from test/filter/c_test.ts
test foo ... ok ([WILDCARD]) foo ... ok ([WILDCARD])
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out ([WILDCARD]) test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out ([WILDCARD])

View file

@ -1,17 +1,18 @@
Check [WILDCARD]/test/finally_timeout.ts Check [WILDCARD]/test/finally_timeout.ts
running 2 tests from [WILDCARD]/test/finally_timeout.ts running 2 tests from test/finally_timeout.ts
test error ... FAILED ([WILDCARD]) error ... FAILED ([WILDCARD])
test success ... ok ([WILDCARD]) success ... ok ([WILDCARD])
failures: failures:
error test/finally_timeout.ts > error
Error: fail Error: fail
at [WILDCARD]/test/finally_timeout.ts:4:11 at [WILDCARD]/test/finally_timeout.ts:4:11
at [WILDCARD] at [WILDCARD]
failures: failures:
test/finally_timeout.ts
error error
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,15 +1,15 @@
Check [WILDCARD]/test/ignore.ts Check [WILDCARD]/test/ignore.ts
running 10 tests from [WILDCARD]/test/ignore.ts running 10 tests from test/ignore.ts
test test 0 ... ignored ([WILDCARD]) test 0 ... ignored ([WILDCARD])
test test 1 ... ignored ([WILDCARD]) test 1 ... ignored ([WILDCARD])
test test 2 ... ignored ([WILDCARD]) test 2 ... ignored ([WILDCARD])
test test 3 ... ignored ([WILDCARD]) test 3 ... ignored ([WILDCARD])
test test 4 ... ignored ([WILDCARD]) test 4 ... ignored ([WILDCARD])
test test 5 ... ignored ([WILDCARD]) test 5 ... ignored ([WILDCARD])
test test 6 ... ignored ([WILDCARD]) test 6 ... ignored ([WILDCARD])
test test 7 ... ignored ([WILDCARD]) test 7 ... ignored ([WILDCARD])
test test 8 ... ignored ([WILDCARD]) test 8 ... ignored ([WILDCARD])
test test 9 ... ignored ([WILDCARD]) test 9 ... ignored ([WILDCARD])
test result: ok. 0 passed; 0 failed; 10 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: ok. 0 passed; 0 failed; 10 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,6 +1,6 @@
Check [WILDCARD]/test/ignore_permissions.ts Check [WILDCARD]/test/ignore_permissions.ts
running 1 test from [WILDCARD]/test/ignore_permissions.ts running 1 test from test/ignore_permissions.ts
test ignore ... ignored ([WILDCARD]) ignore ... ignored ([WILDCARD])
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,5 +1,5 @@
Check [WILDCARD]/test/interval.ts 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]) test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,6 +1,6 @@
Check [WILDCARD]/test/load_unload.ts Check [WILDCARD]/test/load_unload.ts
running 1 test from [WILDCARD]/test/load_unload.ts running 1 test from test/load_unload.ts
test test ... ok ([WILDCARD]) test ... ok ([WILDCARD])
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,7 +1,7 @@
Check [WILDCARD]/test/meta.ts Check [WILDCARD]/test/meta.ts
import.meta.main: false import.meta.main: false
import.meta.url: [WILDCARD]/test/meta.ts 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]) test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,15 +1,16 @@
Check [WILDCARD]/no_prompt_by_default.ts Check [WILDCARD]/no_prompt_by_default.ts
running 1 test from [WILDCARD]/no_prompt_by_default.ts running 1 test from test/no_prompt_by_default.ts
test no prompt ... FAILED ([WILDCARD]ms) no prompt ... FAILED ([WILDCARD]ms)
failures: 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 PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag
[WILDCARD] [WILDCARD]
failures: failures:
test/no_prompt_by_default.ts
no prompt no prompt
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]ms) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]ms)

View file

@ -1,15 +1,16 @@
Check [WILDCARD]/no_prompt_with_denied_perms.ts Check [WILDCARD]/no_prompt_with_denied_perms.ts
running 1 test from [WILDCARD]/no_prompt_with_denied_perms.ts running 1 test from test/no_prompt_with_denied_perms.ts
test no prompt ... FAILED ([WILDCARD]ms) no prompt ... FAILED ([WILDCARD]ms)
failures: 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 PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag
[WILDCARD] [WILDCARD]
failures: failures:
test/no_prompt_with_denied_perms.ts
no prompt no prompt
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]ms) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]ms)

View file

@ -1,6 +1,6 @@
Check [WILDCARD]/test/only.ts Check [WILDCARD]/test/only.ts
running 1 test from [WILDCARD]/test/only.ts running 1 test from test/only.ts
test only ... ok ([WILDCARD]) only ... ok ([WILDCARD])
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out ([WILDCARD]) test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out ([WILDCARD])

View file

@ -1,10 +1,10 @@
Check [WILDCARD]test/ops_sanitizer_missing_details.ts Check [WILDCARD]test/ops_sanitizer_missing_details.ts
running 1 test from [WILDCARD]test/ops_sanitizer_missing_details.ts running 1 test from test/ops_sanitizer_missing_details.ts
test test 1 ... FAILED [WILDCARD] test 1 ... FAILED [WILDCARD]
failures: failures:
test 1 test/ops_sanitizer_missing_details.ts > test 1
Test case is leaking async ops. Test case is leaking async ops.
- 1 async operation to op_write was started in this test, but never completed. - 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: failures:
test/ops_sanitizer_missing_details.ts
test 1 test 1
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD] test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD]

View file

@ -1,11 +1,11 @@
Check [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts Check [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
running 2 tests from [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts running 2 tests from test/ops_sanitizer_multiple_timeout_tests.ts
test test 1 ... FAILED ([WILDCARD]) test 1 ... FAILED ([WILDCARD])
test test 2 ... FAILED ([WILDCARD]) test 2 ... FAILED ([WILDCARD])
failures: failures:
test 1 test/ops_sanitizer_multiple_timeout_tests.ts > test 1
Test case is leaking async ops. 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: - 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]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts:8:27
at [WILDCARD] at [WILDCARD]
test 2 test/ops_sanitizer_multiple_timeout_tests.ts > test 2
Test case is leaking async ops. 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: - 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: failures:
test/ops_sanitizer_multiple_timeout_tests.ts
test 1 test 1
test 2 test 2

View file

@ -1,18 +1,18 @@
Check [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts Check [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
running 2 tests from [WILDCARD]/testdata/test/ops_sanitizer_multiple_timeout_tests.ts running 2 tests from test/ops_sanitizer_multiple_timeout_tests.ts
test test 1 ... FAILED ([WILDCARD]) test 1 ... FAILED ([WILDCARD])
test test 2 ... FAILED ([WILDCARD]) test 2 ... FAILED ([WILDCARD])
failures: failures:
test 1 test/ops_sanitizer_multiple_timeout_tests.ts > test 1
Test case is leaking async ops. 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. - 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. 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. 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. - 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: failures:
test/ops_sanitizer_multiple_timeout_tests.ts
test 1 test 1
test 2 test 2

View file

@ -1,7 +1,7 @@
Check [WILDCARD]/testdata/test/ops_sanitizer_nexttick.ts Check [WILDCARD]/testdata/test/ops_sanitizer_nexttick.ts
running 2 tests from [WILDCARD]/testdata/test/ops_sanitizer_nexttick.ts running 2 tests from test/ops_sanitizer_nexttick.ts
test test 1 ... ok ([WILDCARD]) test 1 ... ok ([WILDCARD])
test test 2 ... ok ([WILDCARD]) test 2 ... ok ([WILDCARD])
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,6 +1,6 @@
Check [WILDCARD]/testdata/test/ops_sanitizer_timeout_failure.ts Check [WILDCARD]/testdata/test/ops_sanitizer_timeout_failure.ts
running 1 test from [WILDCARD]/testdata/test/ops_sanitizer_timeout_failure.ts running 1 test from test/ops_sanitizer_timeout_failure.ts
test wait ... ok ([WILDCARD]) wait ... ok ([WILDCARD])
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,11 +1,11 @@
Check [WILDCARD]/testdata/test/ops_sanitizer_unstable.ts Check [WILDCARD]/testdata/test/ops_sanitizer_unstable.ts
running 2 tests from [WILDCARD]/testdata/test/ops_sanitizer_unstable.ts running 2 tests from test/ops_sanitizer_unstable.ts
test no-op ... ok ([WILDCARD]) no-op ... ok ([WILDCARD])
test leak interval ... FAILED ([WILDCARD]) leak interval ... FAILED ([WILDCARD])
failures: failures:
leak interval test/ops_sanitizer_unstable.ts > leak interval
Test case is leaking async ops. 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: - 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: failures:
test/ops_sanitizer_unstable.ts
leak interval leak interval
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,11 +1,11 @@
Check [WILDCARD]/test/overloads.ts Check [WILDCARD]/test/overloads.ts
running 6 tests from [WILDCARD]/test/overloads.ts running 6 tests from test/overloads.ts
test test0 ... ok ([WILDCARD]) test0 ... ok ([WILDCARD])
test test1 ... ok ([WILDCARD]) test1 ... ok ([WILDCARD])
test test2 ... ok ([WILDCARD]) test2 ... ok ([WILDCARD])
test test3 ... ok ([WILDCARD]) test3 ... ok ([WILDCARD])
test test4 ... ok ([WILDCARD]) test4 ... ok ([WILDCARD])
test test5 ... ignored ([WILDCARD]) test5 ... ignored ([WILDCARD])
test result: ok. 5 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: ok. 5 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,15 +1,15 @@
Check [WILDCARD]/test/pass.ts Check [WILDCARD]/test/pass.ts
running 10 tests from [WILDCARD]/test/pass.ts running 10 tests from test/pass.ts
test test 0 ... ok ([WILDCARD]) test 0 ... ok ([WILDCARD])
test test 1 ... ok ([WILDCARD]) test 1 ... ok ([WILDCARD])
test test 2 ... ok ([WILDCARD]) test 2 ... ok ([WILDCARD])
test test 3 ... ok ([WILDCARD]) test 3 ... ok ([WILDCARD])
test test 4 ... ok ([WILDCARD]) test 4 ... ok ([WILDCARD])
test test 5 ... ok ([WILDCARD]) test 5 ... ok ([WILDCARD])
test test 6 ... ok ([WILDCARD]) test 6 ... ok ([WILDCARD])
test test 7 ... ok ([WILDCARD]) test 7 ... ok ([WILDCARD])
test test 8 ... ok ([WILDCARD]) test 8 ... ok ([WILDCARD])
test test 9 ... ok ([WILDCARD]) test 9 ... ok ([WILDCARD])
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,8 +1,8 @@
running 4 tests from [WILDCARD]/test/quiet.ts running 4 tests from test/quiet.ts
test console.log ... ok ([WILDCARD]) console.log ... ok ([WILDCARD])
test console.error ... ok ([WILDCARD]) console.error ... ok ([WILDCARD])
test console.info ... ok ([WILDCARD]) console.info ... ok ([WILDCARD])
test console.warn ... ok ([WILDCARD]) console.warn ... ok ([WILDCARD])
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,10 +1,10 @@
Check [WILDCARD]/test/resource_sanitizer.ts Check [WILDCARD]/test/resource_sanitizer.ts
running 1 test from [WILDCARD]/test/resource_sanitizer.ts running 1 test from test/resource_sanitizer.ts
test leak ... FAILED ([WILDCARD]) leak ... FAILED ([WILDCARD])
failures: failures:
leak test/resource_sanitizer.ts > leak
AssertionError: Test case is leaking 2 resources: 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. - 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: failures:
test/resource_sanitizer.ts
leak leak
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,39 +1,39 @@
Check [WILDCARD]/test/shuffle/bar_test.ts Check [WILDCARD]/test/shuffle/bar_test.ts
Check [WILDCARD]/test/shuffle/baz_test.ts Check [WILDCARD]/test/shuffle/baz_test.ts
Check [WILDCARD]/test/shuffle/foo_test.ts Check [WILDCARD]/test/shuffle/foo_test.ts
running 10 tests from [WILDCARD]/test/shuffle/foo_test.ts running 10 tests from test/shuffle/foo_test.ts
test test 2 ... ok ([WILDCARD]) test 2 ... ok ([WILDCARD])
test test 3 ... ok ([WILDCARD]) test 3 ... ok ([WILDCARD])
test test 6 ... ok ([WILDCARD]) test 6 ... ok ([WILDCARD])
test test 9 ... ok ([WILDCARD]) test 9 ... ok ([WILDCARD])
test test 8 ... ok ([WILDCARD]) test 8 ... ok ([WILDCARD])
test test 7 ... ok ([WILDCARD]) test 7 ... ok ([WILDCARD])
test test 5 ... ok ([WILDCARD]) test 5 ... ok ([WILDCARD])
test test 4 ... ok ([WILDCARD]) test 4 ... ok ([WILDCARD])
test test 1 ... ok ([WILDCARD]) test 1 ... ok ([WILDCARD])
test test 0 ... ok ([WILDCARD]) test 0 ... ok ([WILDCARD])
running 10 tests from [WILDCARD]/test/shuffle/baz_test.ts running 10 tests from test/shuffle/baz_test.ts
test test 2 ... ok ([WILDCARD]) test 2 ... ok ([WILDCARD])
test test 3 ... ok ([WILDCARD]) test 3 ... ok ([WILDCARD])
test test 6 ... ok ([WILDCARD]) test 6 ... ok ([WILDCARD])
test test 9 ... ok ([WILDCARD]) test 9 ... ok ([WILDCARD])
test test 8 ... ok ([WILDCARD]) test 8 ... ok ([WILDCARD])
test test 7 ... ok ([WILDCARD]) test 7 ... ok ([WILDCARD])
test test 5 ... ok ([WILDCARD]) test 5 ... ok ([WILDCARD])
test test 4 ... ok ([WILDCARD]) test 4 ... ok ([WILDCARD])
test test 1 ... ok ([WILDCARD]) test 1 ... ok ([WILDCARD])
test test 0 ... ok ([WILDCARD]) test 0 ... ok ([WILDCARD])
running 10 tests from [WILDCARD]/test/shuffle/bar_test.ts running 10 tests from test/shuffle/bar_test.ts
test test 2 ... ok ([WILDCARD]) test 2 ... ok ([WILDCARD])
test test 3 ... ok ([WILDCARD]) test 3 ... ok ([WILDCARD])
test test 6 ... ok ([WILDCARD]) test 6 ... ok ([WILDCARD])
test test 9 ... ok ([WILDCARD]) test 9 ... ok ([WILDCARD])
test test 8 ... ok ([WILDCARD]) test 8 ... ok ([WILDCARD])
test test 7 ... ok ([WILDCARD]) test 7 ... ok ([WILDCARD])
test test 5 ... ok ([WILDCARD]) test 5 ... ok ([WILDCARD])
test test 4 ... ok ([WILDCARD]) test 4 ... ok ([WILDCARD])
test test 1 ... ok ([WILDCARD]) test 1 ... ok ([WILDCARD])
test test 0 ... ok ([WILDCARD]) test 0 ... ok ([WILDCARD])
test result: ok. 30 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) test result: ok. 30 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -1,25 +1,25 @@
[WILDCARD] [WILDCARD]
running 3 tests from [WILDCARD]/failing_steps.ts running 3 tests from test/steps/failing_steps.ts
test nested failure ... nested failure ...
test step 1 ... step 1 ...
test inner 1 ... FAILED ([WILDCARD]) inner 1 ... FAILED ([WILDCARD])
Error: Failed. Error: Failed.
at [WILDCARD]/failing_steps.ts:[WILDCARD] at [WILDCARD]/failing_steps.ts:[WILDCARD]
[WILDCARD] [WILDCARD]
test inner 2 ... ok ([WILDCARD]) inner 2 ... ok ([WILDCARD])
FAILED ([WILDCARD]) FAILED ([WILDCARD])
FAILED ([WILDCARD]) FAILED ([WILDCARD])
test multiple test step failures ... multiple test step failures ...
test step 1 ... FAILED ([WILDCARD]) step 1 ... FAILED ([WILDCARD])
Error: Fail. Error: Fail.
[WILDCARD] [WILDCARD]
test step 2 ... FAILED ([WILDCARD]) step 2 ... FAILED ([WILDCARD])
Error: Fail. Error: Fail.
at [WILDCARD]/failing_steps.ts:[WILDCARD] at [WILDCARD]/failing_steps.ts:[WILDCARD]
[WILDCARD] [WILDCARD]
FAILED ([WILDCARD]) FAILED ([WILDCARD])
test failing step in failing test ... failing step in failing test ...
test step 1 ... FAILED ([WILDCARD]) step 1 ... FAILED ([WILDCARD])
Error: Fail. Error: Fail.
at [WILDCARD]/failing_steps.ts:[WILDCARD] at [WILDCARD]/failing_steps.ts:[WILDCARD]
at [WILDCARD] at [WILDCARD]
@ -27,23 +27,24 @@ FAILED ([WILDCARD])
failures: failures:
nested failure test/steps/failing_steps.ts > nested failure
Error: 1 test step failed. Error: 1 test step failed.
at runTest (deno:runtime/js/40_testing.js:[WILDCARD]) at runTest (deno:runtime/js/40_testing.js:[WILDCARD])
at async Object.runTests (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. Error: 2 test steps failed.
at runTest (deno:runtime/js/40_testing.js:[WILDCARD]) at runTest (deno:runtime/js/40_testing.js:[WILDCARD])
at async Object.runTests (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. Error: Fail test.
at [WILDCARD]/failing_steps.ts:[WILDCARD] at [WILDCARD]/failing_steps.ts:[WILDCARD]
at [WILDCARD] at [WILDCARD]
failures: failures:
test/steps/failing_steps.ts
nested failure nested failure
multiple test step failures multiple test step failures
failing step in failing test failing step in failing test

View file

@ -1,8 +1,8 @@
[WILDCARD] [WILDCARD]
running 1 test from [WILDCARD]/ignored_steps.ts running 1 test from test/steps/ignored_steps.ts
test ignored step ... ignored step ...
test step 1 ... ignored ([WILDCARD]) step 1 ... ignored ([WILDCARD])
test step 2 ... ok ([WILDCARD]) step 2 ... ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
test result: ok. 1 passed (1 step); 0 failed; 0 ignored (1 step); 0 measured; 0 filtered out [WILDCARD] test result: ok. 1 passed (1 step); 0 failed; 0 ignored (1 step); 0 measured; 0 filtered out [WILDCARD]

View file

@ -1,14 +1,14 @@
[WILDCARD] [WILDCARD]
running 7 tests from [WILDCARD]/invalid_usage.ts running 7 tests from test/steps/invalid_usage.ts
test capturing ... capturing ...
test some step ... ok ([WILDCARD]) some step ... ok ([WILDCARD])
FAILED ([WILDCARD]) FAILED ([WILDCARD])
test top level missing await ... top level missing await ...
test step ... pending ([WILDCARD]) step ... pending ([WILDCARD])
FAILED ([WILDCARD]) FAILED ([WILDCARD])
test inner missing await ... inner missing await ...
test step ... step ...
test inner ... pending ([WILDCARD]) inner ... pending ([WILDCARD])
Error: Parent scope completed before test step finished execution. Ensure all steps are awaited (ex. `await t.step(...)`). Error: Parent scope completed before test step finished execution. Ensure all steps are awaited (ex. `await t.step(...)`).
at postValidation [WILDCARD] at postValidation [WILDCARD]
at testStepSanitizer [WILDCARD] at testStepSanitizer [WILDCARD]
@ -19,9 +19,9 @@ test inner missing await ...
at async fn ([WILDCARD]/invalid_usage.ts:[WILDCARD]) at async fn ([WILDCARD]/invalid_usage.ts:[WILDCARD])
at async Object.testStepSanitizer [WILDCARD] at async Object.testStepSanitizer [WILDCARD]
FAILED ([WILDCARD]) FAILED ([WILDCARD])
test parallel steps with sanitizers ... parallel steps with sanitizers ...
test step 1 ... pending ([WILDCARD]) step 1 ... pending ([WILDCARD])
test step 2 ... FAILED ([WILDCARD]) step 2 ... FAILED ([WILDCARD])
Error: Cannot start test step while another test step with sanitizers is running. Error: Cannot start test step while another test step with sanitizers is running.
* parallel steps with sanitizers > step 1 * parallel steps with sanitizers > step 1
at preValidation ([WILDCARD]) at preValidation ([WILDCARD])
@ -29,9 +29,9 @@ test parallel steps with sanitizers ...
at [WILDCARD]/invalid_usage.ts:[WILDCARD] at [WILDCARD]/invalid_usage.ts:[WILDCARD]
at [WILDCARD] at [WILDCARD]
FAILED ([WILDCARD]) FAILED ([WILDCARD])
test parallel steps when first has sanitizer ... parallel steps when first has sanitizer ...
test step 1 ... pending ([WILDCARD]) step 1 ... pending ([WILDCARD])
test step 2 ... FAILED ([WILDCARD]) step 2 ... FAILED ([WILDCARD])
Error: Cannot start test step while another test step with sanitizers is running. Error: Cannot start test step while another test step with sanitizers is running.
* parallel steps when first has sanitizer > step 1 * parallel steps when first has sanitizer > step 1
at preValidation ([WILDCARD]) at preValidation ([WILDCARD])
@ -39,9 +39,9 @@ test parallel steps when first has sanitizer ...
at [WILDCARD]/invalid_usage.ts:[WILDCARD] at [WILDCARD]/invalid_usage.ts:[WILDCARD]
at [WILDCARD] at [WILDCARD]
FAILED ([WILDCARD]) FAILED ([WILDCARD])
test parallel steps when second has sanitizer ... parallel steps when second has sanitizer ...
test step 1 ... ok ([WILDCARD]) step 1 ... ok ([WILDCARD])
test step 2 ... FAILED ([WILDCARD]) step 2 ... FAILED ([WILDCARD])
Error: Cannot start test step with sanitizers while another test step is running. Error: Cannot start test step with sanitizers while another test step is running.
* parallel steps when second has sanitizer > step 1 * parallel steps when second has sanitizer > step 1
at preValidation ([WILDCARD]) at preValidation ([WILDCARD])
@ -49,12 +49,12 @@ test parallel steps when second has sanitizer ...
at [WILDCARD]/invalid_usage.ts:[WILDCARD] at [WILDCARD]/invalid_usage.ts:[WILDCARD]
at [WILDCARD] at [WILDCARD]
FAILED ([WILDCARD]) FAILED ([WILDCARD])
test parallel steps where only inner tests have sanitizers ... parallel steps where only inner tests have sanitizers ...
test step 1 ... step 1 ...
test step inner ... ok ([WILDCARD]) step inner ... ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
test step 2 ... step 2 ...
test step inner ... FAILED ([WILDCARD]) step inner ... FAILED ([WILDCARD])
Error: Cannot start test step with sanitizers while another test step is running. Error: Cannot start test step with sanitizers while another test step is running.
* parallel steps where only inner tests have sanitizers > step 1 * parallel steps where only inner tests have sanitizers > step 1
at preValidation ([WILDCARD]) at preValidation ([WILDCARD])
@ -65,40 +65,41 @@ FAILED ([WILDCARD])
failures: 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. 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 TestContext.step ([WILDCARD])
at [WILDCARD]/invalid_usage.ts:[WILDCARD] at [WILDCARD]/invalid_usage.ts:[WILDCARD]
at [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(...)`). 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 postValidation [WILDCARD]
at testStepSanitizer ([WILDCARD]) at testStepSanitizer ([WILDCARD])
[WILDCARD] [WILDCARD]
inner missing await test/steps/invalid_usage.ts > inner missing await
Error: 1 test step failed. Error: 1 test step failed.
at [WILDCARD] 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(...)`). 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 postValidation [WILDCARD]
at testStepSanitizer ([WILDCARD]) at testStepSanitizer ([WILDCARD])
[WILDCARD] [WILDCARD]
parallel steps when first has sanitizer test/steps/invalid_usage.ts > parallel steps when first has sanitizer
Error: 1 test step failed. Error: 1 test step failed.
at runTest ([WILDCARD]) at runTest ([WILDCARD])
at [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. Error: 1 test step failed.
at runTest ([WILDCARD]) at runTest ([WILDCARD])
at [WILDCARD] at [WILDCARD]
failures: failures:
test/steps/invalid_usage.ts
capturing capturing
top level missing await top level missing await
inner missing await inner missing await

View file

@ -1,38 +1,38 @@
[WILDCARD] [WILDCARD]
running 5 tests from [WILDCARD] running 5 tests from test/steps/passing_steps.ts
test description ... description ...
test step 1 ... step 1 ...
test inner 1 ... ok ([WILDCARD]ms) inner 1 ... ok ([WILDCARD]ms)
test inner 2 ... ok ([WILDCARD]ms) inner 2 ... ok ([WILDCARD]ms)
ok ([WILDCARD]ms) ok ([WILDCARD]ms)
ok ([WILDCARD]ms) ok ([WILDCARD]ms)
test parallel steps without sanitizers ... parallel steps without sanitizers ...
test step 1 ... ok ([WILDCARD]) step 1 ... ok ([WILDCARD])
test step 2 ... ok ([WILDCARD]) step 2 ... ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
test parallel steps without sanitizers due to parent ... parallel steps without sanitizers due to parent ...
test step 1 ... ok ([WILDCARD]) step 1 ... ok ([WILDCARD])
test step 2 ... ok ([WILDCARD]) step 2 ... ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
test steps with disabled sanitizers, then enabled, then parallel disabled ... steps with disabled sanitizers, then enabled, then parallel disabled ...
test step 1 ... step 1 ...
test step 1 ... step 1 ...
test step 1 ... step 1 ...
test step 1 ... ok ([WILDCARD]) step 1 ... ok ([WILDCARD])
test step 1 ... ok ([WILDCARD]) step 1 ... ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
test step 2 ... ok ([WILDCARD]) step 2 ... ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
test steps buffered then streaming reporting ... steps buffered then streaming reporting ...
test step 1 ... step 1 ...
test step 1 - 1 ... ok ([WILDCARD]) step 1 - 1 ... ok ([WILDCARD])
test step 1 - 2 ... step 1 - 2 ...
test step 1 - 2 - 1 ... ok ([WILDCARD]) step 1 - 2 - 1 ... ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
test step 2 ... ok ([WILDCARD]) step 2 ... ok ([WILDCARD])
ok ([WILDCARD]) ok ([WILDCARD])
test result: ok. 5 passed (18 steps); 0 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD] test result: ok. 5 passed (18 steps); 0 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD]

View file

@ -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]) test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])

View file

@ -35,6 +35,7 @@ use deno_core::futures::stream;
use deno_core::futures::FutureExt; use deno_core::futures::FutureExt;
use deno_core::futures::StreamExt; use deno_core::futures::StreamExt;
use deno_core::serde_json::json; use deno_core::serde_json::json;
use deno_core::url::Url;
use deno_core::ModuleSpecifier; use deno_core::ModuleSpecifier;
use deno_graph::ModuleKind; use deno_graph::ModuleKind;
use deno_runtime::permissions::Permissions; use deno_runtime::permissions::Permissions;
@ -45,6 +46,7 @@ use rand::seq::SliceRandom;
use rand::SeedableRng; use rand::SeedableRng;
use regex::Regex; use regex::Regex;
use serde::Deserialize; use serde::Deserialize;
use std::collections::BTreeMap;
use std::collections::HashMap; use std::collections::HashMap;
use std::collections::HashSet; use std::collections::HashSet;
use std::io::Write; use std::io::Write;
@ -218,6 +220,7 @@ struct PrettyTestReporter {
echo_output: bool, echo_output: bool,
deferred_step_output: HashMap<TestDescription, Vec<DeferredStepOutput>>, deferred_step_output: HashMap<TestDescription, Vec<DeferredStepOutput>>,
last_wait_output_level: usize, last_wait_output_level: usize,
cwd: Url,
} }
impl PrettyTestReporter { impl PrettyTestReporter {
@ -227,25 +230,31 @@ impl PrettyTestReporter {
echo_output, echo_output,
deferred_step_output: HashMap::new(), deferred_step_output: HashMap::new(),
last_wait_output_level: 0, last_wait_output_level: 0,
cwd: Url::from_directory_path(std::env::current_dir().unwrap()).unwrap(),
} }
} }
fn force_report_wait(&mut self, description: &TestDescription) { fn force_report_wait(&mut self, description: &TestDescription) {
print!("test {} ...", description.name); print!("{} ...", description.name);
// flush for faster feedback when line buffered // flush for faster feedback when line buffered
std::io::stdout().flush().unwrap(); std::io::stdout().flush().unwrap();
self.last_wait_output_level = 0; 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) { fn force_report_step_wait(&mut self, description: &TestStepDescription) {
if self.last_wait_output_level < description.level { if self.last_wait_output_level < description.level {
println!(); println!();
} }
print!( print!("{}{} ...", " ".repeat(description.level), description.name);
"{}test {} ...",
" ".repeat(description.level),
description.name
);
// flush for faster feedback when line buffered // flush for faster feedback when line buffered
std::io::stdout().flush().unwrap(); std::io::stdout().flush().unwrap();
self.last_wait_output_level = description.level; self.last_wait_output_level = description.level;
@ -287,7 +296,15 @@ impl PrettyTestReporter {
impl TestReporter for PrettyTestReporter { impl TestReporter for PrettyTestReporter {
fn report_plan(&mut self, plan: &TestPlan) { fn report_plan(&mut self, plan: &TestPlan) {
let inflection = if plan.total == 1 { "test" } else { "tests" }; 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) { fn report_wait(&mut self, description: &TestDescription) {
@ -388,14 +405,36 @@ impl TestReporter for PrettyTestReporter {
if !summary.failures.is_empty() { if !summary.failures.is_empty() {
println!("\nfailures:\n"); println!("\nfailures:\n");
for (description, error) in &summary.failures { 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!("{}", error);
println!(); println!();
} }
println!("failures:\n"); let mut grouped_by_origin: BTreeMap<String, Vec<String>> =
BTreeMap::default();
for (description, _) in &summary.failures { 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);
}
} }
} }