From e0b9c745c15720914f14996bf357d5b375e2dbd8 Mon Sep 17 00:00:00 2001 From: HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com> Date: Mon, 16 Sep 2024 22:38:40 +0300 Subject: chore: deprecate test itests (#25512) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR is part of #22907 --------- Signed-off-by: HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com> Co-authored-by: Bartek IwaƄczuk --- tests/specs/test/exit_sanitizer/__test__.jsonc | 5 +++ tests/specs/test/exit_sanitizer/exit_sanitizer.out | 38 ++++++++++++++++++++++ tests/specs/test/exit_sanitizer/exit_sanitizer.ts | 11 +++++++ 3 files changed, 54 insertions(+) create mode 100644 tests/specs/test/exit_sanitizer/__test__.jsonc create mode 100644 tests/specs/test/exit_sanitizer/exit_sanitizer.out create mode 100644 tests/specs/test/exit_sanitizer/exit_sanitizer.ts (limited to 'tests/specs/test/exit_sanitizer') diff --git a/tests/specs/test/exit_sanitizer/__test__.jsonc b/tests/specs/test/exit_sanitizer/__test__.jsonc new file mode 100644 index 000000000..79d075d67 --- /dev/null +++ b/tests/specs/test/exit_sanitizer/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "test exit_sanitizer.ts", + "output": "exit_sanitizer.out", + "exitCode": 1 +} diff --git a/tests/specs/test/exit_sanitizer/exit_sanitizer.out b/tests/specs/test/exit_sanitizer/exit_sanitizer.out new file mode 100644 index 000000000..305d51cc8 --- /dev/null +++ b/tests/specs/test/exit_sanitizer/exit_sanitizer.out @@ -0,0 +1,38 @@ +Check [WILDCARD]/exit_sanitizer.ts +running 3 tests from [WILDCARD]/exit_sanitizer.ts +exit(0) ... FAILED ([WILDCARD]) +exit(1) ... FAILED ([WILDCARD]) +exit(2) ... FAILED ([WILDCARD]) + + ERRORS + +exit(0) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD] +error: Error: Test case attempted to exit with exit code: 0 + Deno.exit(0); + ^ + at [WILDCARD] + at [WILDCARD]/exit_sanitizer.ts:2:8 + +exit(1) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD] +error: Error: Test case attempted to exit with exit code: 1 + Deno.exit(1); + ^ + at [WILDCARD] + at [WILDCARD]/exit_sanitizer.ts:6:8 + +exit(2) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD] +error: Error: Test case attempted to exit with exit code: 2 + Deno.exit(2); + ^ + at [WILDCARD] + at [WILDCARD]/exit_sanitizer.ts:10:8 + + FAILURES + +exit(0) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD] +exit(1) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD] +exit(2) => [WILDCARD]/exit_sanitizer.ts:[WILDCARD] + +FAILED | 0 passed | 3 failed ([WILDCARD]) + +error: Test failed diff --git a/tests/specs/test/exit_sanitizer/exit_sanitizer.ts b/tests/specs/test/exit_sanitizer/exit_sanitizer.ts new file mode 100644 index 000000000..186406a9d --- /dev/null +++ b/tests/specs/test/exit_sanitizer/exit_sanitizer.ts @@ -0,0 +1,11 @@ +Deno.test("exit(0)", function () { + Deno.exit(0); +}); + +Deno.test("exit(1)", function () { + Deno.exit(1); +}); + +Deno.test("exit(2)", function () { + Deno.exit(2); +}); -- cgit v1.2.3