diff options
Diffstat (limited to 'cli/tests')
5 files changed, 28 insertions, 0 deletions
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs index 5150aeb92..97aba8051 100644 --- a/cli/tests/integration/test_tests.rs +++ b/cli/tests/integration/test_tests.rs @@ -663,3 +663,9 @@ fn conditionally_loads_type_graph() { .run(); assert_not_contains!(output.combined_output(), "type_reference.d.ts"); } + +itest!(test_include_relative_pattern_dot_slash { + args: "test", + output: "test/relative_pattern_dot_slash/output.out", + cwd: Some("test/relative_pattern_dot_slash"), +}); diff --git a/cli/tests/testdata/test/relative_pattern_dot_slash/deno.json b/cli/tests/testdata/test/relative_pattern_dot_slash/deno.json new file mode 100644 index 000000000..7c2c4a5d3 --- /dev/null +++ b/cli/tests/testdata/test/relative_pattern_dot_slash/deno.json @@ -0,0 +1,7 @@ +{ + "test": { + "include": [ + "./test/**/*.test.mjs" + ] + } +} diff --git a/cli/tests/testdata/test/relative_pattern_dot_slash/output.out b/cli/tests/testdata/test/relative_pattern_dot_slash/output.out new file mode 100644 index 000000000..be2961cff --- /dev/null +++ b/cli/tests/testdata/test/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/cli/tests/testdata/test/relative_pattern_dot_slash/test/add.mjs b/cli/tests/testdata/test/relative_pattern_dot_slash/test/add.mjs new file mode 100644 index 000000000..7d658310b --- /dev/null +++ b/cli/tests/testdata/test/relative_pattern_dot_slash/test/add.mjs @@ -0,0 +1,3 @@ +export function add(a, b) { + return a + b; +} diff --git a/cli/tests/testdata/test/relative_pattern_dot_slash/test/add.test.mjs b/cli/tests/testdata/test/relative_pattern_dot_slash/test/add.test.mjs new file mode 100644 index 000000000..7b21d2fbc --- /dev/null +++ b/cli/tests/testdata/test/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"); + } +}); |