summaryrefslogtreecommitdiff
path: root/tests/specs/test/junit_multiple_test_files
diff options
context:
space:
mode:
authorHasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com>2024-09-16 22:38:40 +0300
committerGitHub <noreply@github.com>2024-09-16 19:38:40 +0000
commite0b9c745c15720914f14996bf357d5b375e2dbd8 (patch)
tree0dfc717082bedb2eec13eceb5cdeb1ef12b8f7f5 /tests/specs/test/junit_multiple_test_files
parent6ce16145dd12d8a272cb543871276c33c8201a37 (diff)
chore: deprecate test itests (#25512)
This PR is part of #22907 --------- Signed-off-by: HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com> Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'tests/specs/test/junit_multiple_test_files')
-rw-r--r--tests/specs/test/junit_multiple_test_files/__test__.jsonc5
-rw-r--r--tests/specs/test/junit_multiple_test_files/fail.ts30
-rw-r--r--tests/specs/test/junit_multiple_test_files/main.out102
-rw-r--r--tests/specs/test/junit_multiple_test_files/pass.ts37
4 files changed, 174 insertions, 0 deletions
diff --git a/tests/specs/test/junit_multiple_test_files/__test__.jsonc b/tests/specs/test/junit_multiple_test_files/__test__.jsonc
new file mode 100644
index 000000000..d9b01bcb4
--- /dev/null
+++ b/tests/specs/test/junit_multiple_test_files/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "test --reporter junit pass.ts fail.ts",
+ "exitCode": 1,
+ "output": "main.out"
+}
diff --git a/tests/specs/test/junit_multiple_test_files/fail.ts b/tests/specs/test/junit_multiple_test_files/fail.ts
new file mode 100644
index 000000000..9340db556
--- /dev/null
+++ b/tests/specs/test/junit_multiple_test_files/fail.ts
@@ -0,0 +1,30 @@
+Deno.test("test 0", () => {
+ throw new Error();
+});
+Deno.test("test 1", () => {
+ throw new Error();
+});
+Deno.test("test 2", () => {
+ throw new Error();
+});
+Deno.test("test 3", () => {
+ throw new Error();
+});
+Deno.test("test 4", () => {
+ throw new Error();
+});
+Deno.test("test 5", () => {
+ throw new Error();
+});
+Deno.test("test 6", () => {
+ throw new Error();
+});
+Deno.test("test 7", () => {
+ throw new Error();
+});
+Deno.test("test 8", () => {
+ throw new Error();
+});
+Deno.test("test 9", () => {
+ throw new Error();
+});
diff --git a/tests/specs/test/junit_multiple_test_files/main.out b/tests/specs/test/junit_multiple_test_files/main.out
new file mode 100644
index 000000000..4ca962fd8
--- /dev/null
+++ b/tests/specs/test/junit_multiple_test_files/main.out
@@ -0,0 +1,102 @@
+Check file:///[WILDCARD]/pass.ts
+Check file:///[WILDCARD]/fail.ts
+<?xml version="1.0" encoding="UTF-8"?>
+<testsuites name="deno test" tests="26" failures="10" errors="0" time="[WILDCARD]">
+ <testsuite name="./pass.ts" tests="16" disabled="0" errors="0" failures="0">
+ <testcase name="test 0" classname="./pass.ts" time="[WILDCARD]" line="1" col="6">
+ </testcase>
+ <testcase name="test 1" classname="./pass.ts" time="[WILDCARD]" line="2" col="6">
+ </testcase>
+ <testcase name="test 2" classname="./pass.ts" time="[WILDCARD]" line="3" col="6">
+ </testcase>
+ <testcase name="test 3" classname="./pass.ts" time="[WILDCARD]" line="4" col="6">
+ </testcase>
+ <testcase name="test 4" classname="./pass.ts" time="[WILDCARD]" line="5" col="6">
+ </testcase>
+ <testcase name="test 5" classname="./pass.ts" time="[WILDCARD]" line="6" col="6">
+ </testcase>
+ <testcase name="test 6" classname="./pass.ts" time="[WILDCARD]" line="7" col="6">
+ </testcase>
+ <testcase name="test 7" classname="./pass.ts" time="[WILDCARD]" line="8" col="6">
+ </testcase>
+ <testcase name="test 8" classname="./pass.ts" time="[WILDCARD]" line="9" col="6">
+ </testcase>
+ <testcase name="test 9" classname="./pass.ts" time="[WILDCARD]" line="12" col="6">
+ </testcase>
+ <testcase name="test\b" classname="./pass.ts" time="[WILDCARD]" line="16" col="6">
+ </testcase>
+ <testcase name="test\f" classname="./pass.ts" time="[WILDCARD]" line="19" col="6">
+ </testcase>
+ <testcase name="test\t" classname="./pass.ts" time="[WILDCARD]" line="23" col="6">
+ </testcase>
+ <testcase name="test\n" classname="./pass.ts" time="[WILDCARD]" line="27" col="6">
+ </testcase>
+ <testcase name="test\r" classname="./pass.ts" time="[WILDCARD]" line="31" col="6">
+ </testcase>
+ <testcase name="test\v" classname="./pass.ts" time="[WILDCARD]" line="35" col="6">
+ </testcase>
+ </testsuite>
+ <testsuite name="./fail.ts" tests="10" disabled="0" errors="0" failures="10">
+ <testcase name="test 0" classname="./fail.ts" time="[WILDCARD]" line="1" col="6">
+ <failure message="Uncaught Error">Error
+ throw new Error();
+ ^
+ at file:///[WILDCARD]/fail.ts:2:9</failure>
+ </testcase>
+ <testcase name="test 1" classname="./fail.ts" time="[WILDCARD]" line="4" col="6">
+ <failure message="Uncaught Error">Error
+ throw new Error();
+ ^
+ at file:///[WILDCARD]/fail.ts:5:9</failure>
+ </testcase>
+ <testcase name="test 2" classname="./fail.ts" time="[WILDCARD]" line="7" col="6">
+ <failure message="Uncaught Error">Error
+ throw new Error();
+ ^
+ at file:///[WILDCARD]/fail.ts:8:9</failure>
+ </testcase>
+ <testcase name="test 3" classname="./fail.ts" time="[WILDCARD]" line="10" col="6">
+ <failure message="Uncaught Error">Error
+ throw new Error();
+ ^
+ at file:///[WILDCARD]/fail.ts:11:9</failure>
+ </testcase>
+ <testcase name="test 4" classname="./fail.ts" time="[WILDCARD]" line="13" col="6">
+ <failure message="Uncaught Error">Error
+ throw new Error();
+ ^
+ at file:///[WILDCARD]/fail.ts:14:9</failure>
+ </testcase>
+ <testcase name="test 5" classname="./fail.ts" time="[WILDCARD]" line="16" col="6">
+ <failure message="Uncaught Error">Error
+ throw new Error();
+ ^
+ at file:///[WILDCARD]/fail.ts:17:9</failure>
+ </testcase>
+ <testcase name="test 6" classname="./fail.ts" time="[WILDCARD]" line="19" col="6">
+ <failure message="Uncaught Error">Error
+ throw new Error();
+ ^
+ at file:///[WILDCARD]/fail.ts:20:9</failure>
+ </testcase>
+ <testcase name="test 7" classname="./fail.ts" time="[WILDCARD]" line="22" col="6">
+ <failure message="Uncaught Error">Error
+ throw new Error();
+ ^
+ at file:///[WILDCARD]/fail.ts:23:9</failure>
+ </testcase>
+ <testcase name="test 8" classname="./fail.ts" time="[WILDCARD]" line="25" col="6">
+ <failure message="Uncaught Error">Error
+ throw new Error();
+ ^
+ at file:///[WILDCARD]/fail.ts:26:9</failure>
+ </testcase>
+ <testcase name="test 9" classname="./fail.ts" time="[WILDCARD]" line="28" col="6">
+ <failure message="Uncaught Error">Error
+ throw new Error();
+ ^
+ at file:///[WILDCARD]/fail.ts:29:9</failure>
+ </testcase>
+ </testsuite>
+</testsuites>
+error: Test failed
diff --git a/tests/specs/test/junit_multiple_test_files/pass.ts b/tests/specs/test/junit_multiple_test_files/pass.ts
new file mode 100644
index 000000000..c4c0f45dc
--- /dev/null
+++ b/tests/specs/test/junit_multiple_test_files/pass.ts
@@ -0,0 +1,37 @@
+Deno.test("test 0", () => {});
+Deno.test("test 1", () => {});
+Deno.test("test 2", () => {});
+Deno.test("test 3", () => {});
+Deno.test("test 4", () => {});
+Deno.test("test 5", () => {});
+Deno.test("test 6", () => {});
+Deno.test("test 7", () => {});
+Deno.test("test 8", () => {
+ console.log("console.log");
+});
+Deno.test("test 9", () => {
+ console.error("console.error");
+});
+
+Deno.test("test\b", () => {
+ console.error("console.error");
+});
+Deno.test("test\f", () => {
+ console.error("console.error");
+});
+
+Deno.test("test\t", () => {
+ console.error("console.error");
+});
+
+Deno.test("test\n", () => {
+ console.error("console.error");
+});
+
+Deno.test("test\r", () => {
+ console.error("console.error");
+});
+
+Deno.test("test\v", () => {
+ console.error("console.error");
+});