Skip to content

Commit

Permalink
add e2e test to prevent tmp directory regression
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Dec 4, 2024
1 parent b992319 commit 7725249
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/wrangler/e2e/pages-dev.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { existsSync } from "node:fs";
import path from "node:path";
import { setTimeout } from "node:timers/promises";
import getPort from "get-port";
import dedent from "ts-dedent";
Expand Down Expand Up @@ -482,6 +484,11 @@ describe.each([{ cmd: "wrangler pages dev" }])("Pages $cmd", ({ cmd }) => {

text = await fetchText(url);
expect(text).toBe("Updated Worker!");

// Ensure Wrangler doesn't write tmp files in the functions directory—regression test for https://github.com/cloudflare/workers-sdk/issues/7440
expect(
existsSync(path.join(helper.tmpPath, "functions/.wrangler"))
).toBeFalsy();
});

it("should support modifying dependencies during dev session (Functions)", async () => {
Expand Down

0 comments on commit 7725249

Please sign in to comment.