diff --git a/.gitignore b/.gitignore index 4248f0ce811..187228c6acf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,4 @@ tmp/ vendor/ node_modules/ .docs/ -.DS_Store -tmp-* -tmp_* \ No newline at end of file +.DS_Store \ No newline at end of file diff --git a/init/src/init.ts b/init/src/init.ts index 209a618330d..f477850cedb 100644 --- a/init/src/init.ts +++ b/init/src/init.ts @@ -553,8 +553,7 @@ if (Deno.args.includes("build")) { const denoJson = { tasks: { - check: - "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx", + check: "deno fmt --check && deno lint && deno check --config deno.json .", dev: "deno run -A --watch=static/,routes/ dev.ts", build: "deno run -A dev.ts build", start: "deno run -A main.ts", diff --git a/init/src/init_test.ts b/init/src/init_test.ts index c0a2a898b3a..825586316c7 100644 --- a/init/src/init_test.ts +++ b/init/src/init_test.ts @@ -6,8 +6,7 @@ import { waitForText } from "../../tests/test_utils.tsx"; import { withChildProcessServer } from "../../tests/test_utils.tsx"; async function withTmpDir(fn: (dir: string) => void | Promise) { - const hash = crypto.randomUUID().replaceAll(/-/g, ""); - const dir = path.join(import.meta.dirname!, "..", "..", `tmp_${hash}`); + const dir = await Deno.makeTempDir({ prefix: "fresh-" }); await Deno.mkdir(dir, { recursive: true }); try { @@ -135,9 +134,12 @@ Deno.test("init - fmt, lint, and type check project", async () => { const check = await new Deno.Command(Deno.execPath(), { args: ["task", "check"], cwd: dir, - stderr: "inherit", - stdout: "inherit", + stderr: "piped", + stdout: "piped", }).output(); + const out = getStdOutput(check); + // deno-lint-ignore no-console + console.log(out); expect(check.code).toEqual(0); }); });