Skip to content

Commit d86dcd6

Browse files
authored
fix: tests broken on Deno 2.1 (#2776)
Resolves #2771 Specifically the `init` test fails: ``` deno test -A ./init ``` Output: ``` error: No target files found. ----- output end ----- init - fmt, lint, and type check project ... FAILED (157ms) init with tailwind - fmt, lint, and type check project ... ------- output ------- Task check deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx error: No target files found. ----- output end ----- init with tailwind - fmt, lint, and type check project ... FAILED (136ms) ``` Seems to be a gitignore issue, and _probably_ relates to the new features that ["lint an fmt respect gitignore"](denoland/deno#26897): - the gitignore file in the fresh project has `tmp-*` - the tmp directory created by the init test matches that pattern: `tmp-${hash}` - changing the tmp directory to `tmp_${hash}` resolves the issue 😄
1 parent 6ee4551 commit d86dcd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init/src/init_test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { withChildProcessServer } from "../../tests/test_utils.tsx";
77

88
async function withTmpDir(fn: (dir: string) => void | Promise<void>) {
99
const hash = crypto.randomUUID().replaceAll(/-/g, "");
10-
const dir = path.join(import.meta.dirname!, "..", "..", `tmp-${hash}`);
10+
const dir = path.join(import.meta.dirname!, "..", "..", `tmp_${hash}`);
1111
await Deno.mkdir(dir, { recursive: true });
1212

1313
try {

0 commit comments

Comments
 (0)