Skip to content

Commit a49fc37

Browse files
chore: ignore check fmt on canary (#2925)
Ignore checking formatting on canary as the formatting might be different from stable releases of Deno.
1 parent d68b5ec commit a49fc37

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

init/src/init_test.ts

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -121,25 +121,31 @@ Deno.test("init - with vscode", async () => {
121121
});
122122
});
123123

124-
Deno.test("init - fmt, lint, and type check project", async () => {
125-
await withTmpDir(async (dir) => {
126-
const mock = mockUserInput({
127-
[InitStep.ProjectName]: ".",
124+
Deno.test({
125+
name: "init - fmt, lint, and type check project",
126+
// Ignore this test on canary due to different formatting
127+
// behaviours when the formatter changes.
128+
ignore: Deno.version.deno.includes("+"),
129+
fn: async () => {
130+
await withTmpDir(async (dir) => {
131+
const mock = mockUserInput({
132+
[InitStep.ProjectName]: ".",
133+
});
134+
await initProject(dir, [], {}, mock.tty);
135+
await expectProjectFile(dir, "main.ts");
136+
await expectProjectFile(dir, "dev.ts");
137+
138+
await patchProject(dir);
139+
140+
const check = await new Deno.Command(Deno.execPath(), {
141+
args: ["task", "check"],
142+
cwd: dir,
143+
stderr: "inherit",
144+
stdout: "inherit",
145+
}).output();
146+
expect(check.code).toEqual(0);
128147
});
129-
await initProject(dir, [], {}, mock.tty);
130-
await expectProjectFile(dir, "main.ts");
131-
await expectProjectFile(dir, "dev.ts");
132-
133-
await patchProject(dir);
134-
135-
const check = await new Deno.Command(Deno.execPath(), {
136-
args: ["task", "check"],
137-
cwd: dir,
138-
stderr: "inherit",
139-
stdout: "inherit",
140-
}).output();
141-
expect(check.code).toEqual(0);
142-
});
148+
},
143149
});
144150

145151
Deno.test("init with tailwind - fmt, lint, and type check project", async () => {

0 commit comments

Comments
 (0)