Skip to content

Commit

Permalink
regression test: ensure assets are still updated
Browse files Browse the repository at this point in the history
  • Loading branch information
RamIdeas committed Oct 2, 2024
1 parent a29afa5 commit f36c87a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/wrangler/e2e/dev.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,21 @@ describe("custom builds", () => {
await expect(
worker.readUntil(/Running custom build:/, 5_000)
).rejects.toThrowError();

// now check assets are still fetchable, even after updates

const { url } = await worker.waitForReady();

const res = await fetch(url);
await expect(res.text()).resolves.toBe("hello\n");

await helper.seed({
"public/index.html": "world",
});
await setTimeout(300);

const res2 = await fetch(url);
await expect(res2.text()).resolves.toBe("world");
});
});

Expand Down

0 comments on commit f36c87a

Please sign in to comment.