Skip to content

Commit 417589a

Browse files
Add test for when no output directory is in the autoconfig details
1 parent 9fa63d4 commit 417589a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/wrangler/src/__tests__/autoconfig/run.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,5 +340,24 @@ describe("autoconfig (deploy)", () => {
340340
"
341341
`);
342342
});
343+
344+
it("errors if no output directory is specified in the autoconfig details", async () => {
345+
mockConfirm({
346+
text: "Do you want to modify these settings?",
347+
result: false,
348+
});
349+
350+
await expect(
351+
run.runAutoConfig({
352+
projectPath: process.cwd(),
353+
configured: false,
354+
framework: new Static("static"),
355+
workerName: "my-worker",
356+
outputDir: "",
357+
})
358+
).rejects.toThrowErrorMatchingInlineSnapshot(
359+
`[Error: Cannot configure project without an output directory]`
360+
);
361+
});
343362
});
344363
});

0 commit comments

Comments
 (0)