Skip to content

Commit

Permalink
fixup! [wrangler] fix: stop rebuild attempts when sources are missing (
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Jan 31, 2024
1 parent 9723e08 commit cf9a391
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions fixtures/pages-workerjs-app/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,16 @@ describe("Pages _worker.js", () => {
"workerjs-test/XXX_worker.js"
);
await setTimeout(1000);
expect(getOutput()).toMatchInlineSnapshot('""');

clearOutput();
// Expect no output since the deletion of the worker should be ignored
expect(getOutput()).toBe("");
await tryRename(
basePath,
"workerjs-test/XXX_worker.js",
"workerjs-test/_worker.js"
);
await setTimeout(1000);
expect(getOutput()).toMatchInlineSnapshot(`
"✨ Compiled Worker successfully
⎔ Reloading local server...

▲ [WARNING] kj/filesystem-disk-unix.c++:1709: warning: PWD environment variable doesn't match current directory; pwd = /Users/pbacondarwin/dev/cloudflare/workers-sdk
"
`);
// Expect replacing the worker to now trigger a success build.
expect(getOutput()).toContain("Compiled Worker successfully");
} finally {
await stop();
await tryRename(
Expand Down

0 comments on commit cf9a391

Please sign in to comment.