summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/test
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/test')
-rw-r--r--cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out57
-rw-r--r--cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.ts10
-rw-r--r--cli/tests/testdata/test/ops_sanitizer_unstable.out10
3 files changed, 72 insertions, 5 deletions
diff --git a/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out b/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out
new file mode 100644
index 000000000..1981a2500
--- /dev/null
+++ b/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.out
@@ -0,0 +1,57 @@
+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])
+
+failures:
+
+test 1
+AssertionError: Test case is leaking async ops.
+Before:
+ - dispatched: 0
+ - completed: 0
+After:
+ - dispatched: [WILDCARD]
+ - completed: [WILDCARD]
+Ops:
+ op_sleep:
+ Before:
+ - dispatched: 0
+ - completed: 0
+ After:
+ - dispatched: [WILDCARD]
+ - completed: [WILDCARD]
+
+Make sure to await all promises returned from Deno APIs before
+finishing test case.
+ at [WILDCARD]
+
+test 2
+AssertionError: Test case is leaking async ops.
+Before:
+ - dispatched: [WILDCARD]
+ - completed: [WILDCARD]
+After:
+ - dispatched: [WILDCARD]
+ - completed: [WILDCARD]
+Ops:
+ op_sleep:
+ Before:
+ - dispatched: [WILDCARD]
+ - completed: [WILDCARD]
+ After:
+ - dispatched: [WILDCARD]
+ - completed: [WILDCARD]
+
+Make sure to await all promises returned from Deno APIs before
+finishing test case.
+ at [WILDCARD]
+
+failures:
+
+ test 1
+ test 2
+
+test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
+
+error: Test failed
diff --git a/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.ts b/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
new file mode 100644
index 000000000..f30773cf2
--- /dev/null
+++ b/cli/tests/testdata/test/ops_sanitizer_multiple_timeout_tests.ts
@@ -0,0 +1,10 @@
+// https://github.com/denoland/deno/issues/8965
+
+function test() {
+ setTimeout(() => {}, 10000);
+ setTimeout(() => {}, 10001);
+}
+
+Deno.test("test 1", test);
+
+Deno.test("test 2", test);
diff --git a/cli/tests/testdata/test/ops_sanitizer_unstable.out b/cli/tests/testdata/test/ops_sanitizer_unstable.out
index 3faea472b..9d6a903e1 100644
--- a/cli/tests/testdata/test/ops_sanitizer_unstable.out
+++ b/cli/tests/testdata/test/ops_sanitizer_unstable.out
@@ -11,16 +11,16 @@ Before:
- dispatched: 1
- completed: 1
After:
- - dispatched: 3
- - completed: 2
+ - dispatched: [WILDCARD]
+ - completed: [WILDCARD]
Ops:
- op_global_timer:
+ op_sleep:
Before:
- dispatched: 1
- completed: 1
After:
- - dispatched: 3
- - completed: 2
+ - dispatched: [WILDCARD]
+ - completed: [WILDCARD]
Make sure to await all promises returned from Deno APIs before
finishing test case.