Skip to content

Commit 8bd8a1b

Browse files
fix more
1 parent 03b2eb6 commit 8bd8a1b

3 files changed

Lines changed: 10 additions & 17 deletions

File tree

deno.lock

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/fresh/tests/doc_examples_test.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@ Deno.test("Docs Code example checks", async () => {
6565

6666
async function* docsMarkdownFiles() {
6767
// Limit to checking Fresh v2 (canary) docs for now
68-
const docsDir = join(import.meta.dirname!, "..", "docs", "canary");
68+
const docsDir = join(
69+
import.meta.dirname!,
70+
"..",
71+
"..",
72+
"..",
73+
"docs",
74+
"canary",
75+
);
6976
const docsIter = walk(docsDir, { exts: [".md"], includeDirs: false });
7077

7178
for await (const entry of docsIter) {

packages/init/src/init_test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as path from "@std/path";
88
import { getStdOutput, withBrowser } from "../../fresh/tests/test_utils.tsx";
99
import { waitForText } from "../../fresh/tests/test_utils.tsx";
1010
import { withChildProcessServer } from "../../fresh/tests/test_utils.tsx";
11-
import { withTmpDir as withTmpDirBase } from "../../fresh/src/test_utils.ts";
11+
import { withTmpDir } from "../../fresh/src/test_utils.ts";
1212
import { stub } from "@std/testing/mock";
1313

1414
function stubPrompt(result: string) {
@@ -23,21 +23,14 @@ function stubConfirm(steps: Record<string, boolean> = {}) {
2323
);
2424
}
2525

26-
function withTmpDir(): Promise<{ dir: string } & AsyncDisposable> {
27-
return withTmpDirBase({
28-
dir: path.join(import.meta.dirname!, "..", ".."),
29-
prefix: "tmp_",
30-
});
31-
}
32-
3326
async function patchProject(dir: string): Promise<void> {
3427
const jsonPath = path.join(dir, "deno.json");
3528
const json = JSON.parse(await Deno.readTextFile(jsonPath));
3629

3730
json.workspace = [];
3831
// See https://github.com/denoland/deno/issues/27313
3932
// json.links = [path.fromFileURL(new URL("../..", import.meta.url))];
40-
json.links = [new URL("../..", import.meta.url).href];
33+
json.links = [new URL("../../fresh", import.meta.url).href];
4134

4235
// assert with this stricter rule, before adding it to initialized projects
4336
json.lint.rules.include = ["verbatim-module-syntax"];

0 commit comments

Comments
 (0)