From da52058a945999d486b07700d2834f027a65947c Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 29 Apr 2024 10:08:27 -0400 Subject: chore: migrate bench, publish, and more itests to spec tests (#23584) --- tests/specs/test/include_relative_pattern_dot_slash/__test__.jsonc | 4 ++++ tests/specs/test/include_relative_pattern_dot_slash/deno.json | 7 +++++++ tests/specs/test/include_relative_pattern_dot_slash/output.out | 5 +++++ tests/specs/test/include_relative_pattern_dot_slash/test/add.mjs | 3 +++ .../test/include_relative_pattern_dot_slash/test/add.test.mjs | 7 +++++++ 5 files changed, 26 insertions(+) create mode 100644 tests/specs/test/include_relative_pattern_dot_slash/__test__.jsonc create mode 100644 tests/specs/test/include_relative_pattern_dot_slash/deno.json create mode 100644 tests/specs/test/include_relative_pattern_dot_slash/output.out create mode 100644 tests/specs/test/include_relative_pattern_dot_slash/test/add.mjs create mode 100644 tests/specs/test/include_relative_pattern_dot_slash/test/add.test.mjs (limited to 'tests/specs/test/include_relative_pattern_dot_slash') diff --git a/tests/specs/test/include_relative_pattern_dot_slash/__test__.jsonc b/tests/specs/test/include_relative_pattern_dot_slash/__test__.jsonc new file mode 100644 index 000000000..335c9ccd6 --- /dev/null +++ b/tests/specs/test/include_relative_pattern_dot_slash/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "test", + "output": "output.out" +} diff --git a/tests/specs/test/include_relative_pattern_dot_slash/deno.json b/tests/specs/test/include_relative_pattern_dot_slash/deno.json new file mode 100644 index 000000000..7c2c4a5d3 --- /dev/null +++ b/tests/specs/test/include_relative_pattern_dot_slash/deno.json @@ -0,0 +1,7 @@ +{ + "test": { + "include": [ + "./test/**/*.test.mjs" + ] + } +} diff --git a/tests/specs/test/include_relative_pattern_dot_slash/output.out b/tests/specs/test/include_relative_pattern_dot_slash/output.out new file mode 100644 index 000000000..be2961cff --- /dev/null +++ b/tests/specs/test/include_relative_pattern_dot_slash/output.out @@ -0,0 +1,5 @@ +running 1 test from ./test/add.test.mjs +should add ... ok ([WILDCARD]) + +ok | 1 passed | 0 failed ([WILDCARD]) + diff --git a/tests/specs/test/include_relative_pattern_dot_slash/test/add.mjs b/tests/specs/test/include_relative_pattern_dot_slash/test/add.mjs new file mode 100644 index 000000000..7d658310b --- /dev/null +++ b/tests/specs/test/include_relative_pattern_dot_slash/test/add.mjs @@ -0,0 +1,3 @@ +export function add(a, b) { + return a + b; +} diff --git a/tests/specs/test/include_relative_pattern_dot_slash/test/add.test.mjs b/tests/specs/test/include_relative_pattern_dot_slash/test/add.test.mjs new file mode 100644 index 000000000..7b21d2fbc --- /dev/null +++ b/tests/specs/test/include_relative_pattern_dot_slash/test/add.test.mjs @@ -0,0 +1,7 @@ +import { add } from "./add.mjs"; + +Deno.test("should add", () => { + if (add(1, 2) !== 3) { + throw new Error("FAIL"); + } +}); -- cgit v1.2.3