summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/test_tests.rs6
-rw-r--r--cli/tests/testdata/test/aggregate_error.out24
-rw-r--r--cli/tests/testdata/test/aggregate_error.ts6
3 files changed, 36 insertions, 0 deletions
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs
index 0baf94422..24ceeefb4 100644
--- a/cli/tests/integration/test_tests.rs
+++ b/cli/tests/integration/test_tests.rs
@@ -180,3 +180,9 @@ itest!(shuffle_with_seed {
exit_code: 0,
output: "test/shuffle.out",
});
+
+itest!(aggregate_error {
+ args: "test test/aggregate_error.ts",
+ exit_code: 1,
+ output: "test/aggregate_error.out",
+});
diff --git a/cli/tests/testdata/test/aggregate_error.out b/cli/tests/testdata/test/aggregate_error.out
new file mode 100644
index 000000000..ed1ee1a94
--- /dev/null
+++ b/cli/tests/testdata/test/aggregate_error.out
@@ -0,0 +1,24 @@
+Check [WILDCARD]/testdata/test/aggregate_error.ts
+running 1 test from [WILDCARD]/testdata/test/aggregate_error.ts
+test aggregate ... FAILED ([WILDCARD])
+
+failures:
+
+aggregate
+AggregateError
+ Error: Error 1
+ at [WILDCARD]/testdata/test/aggregate_error.ts:2:18
+ [WILDCARD]
+ Error: Error 2
+ at [WILDCARD]/testdata/test/aggregate_error.ts:3:18
+ [WILDCARD]
+ at [WILDCARD]/testdata/test/aggregate_error.ts:5:9
+ at [WILDCARD]
+
+failures:
+
+ aggregate
+
+test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
+
+error: Test failed
diff --git a/cli/tests/testdata/test/aggregate_error.ts b/cli/tests/testdata/test/aggregate_error.ts
new file mode 100644
index 000000000..0661ea249
--- /dev/null
+++ b/cli/tests/testdata/test/aggregate_error.ts
@@ -0,0 +1,6 @@
+Deno.test("aggregate", function () {
+ const error1 = new Error("Error 1");
+ const error2 = new Error("Error 2");
+
+ throw new AggregateError([error1, error2]);
+});