Skip to content

Commit 0782e55

Browse files
update worker-log tests to account for nodejs compat process v2 flag
1 parent 4cb520c commit 0782e55

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

fixtures/worker-logs/tests/index.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,4 +306,23 @@ describe("'wrangler dev' correctly displays logs", () => {
306306
expect(output).toMatchInlineSnapshot(`[]`);
307307
});
308308
});
309+
310+
describe("nodejs compat process v2", () => {
311+
test("default behavior", async ({ expect }) => {
312+
const output = await getWranglerDevOutput("module", [
313+
"--compatibility-flags=enable_nodejs_process_v2",
314+
"--compatibility-flags=nodejs_compat",
315+
]);
316+
expect(output).toMatchInlineSnapshot(`
317+
[
318+
"<<<<< console.info() message >>>>>",
319+
"<<<<< console.log() message >>>>>",
320+
"X [ERROR] <<<<< console.error() message >>>>>",
321+
"stderr: <<<<< stderr.write() message >>>>>",
322+
"stdout: <<<<< stdout.write() message >>>>>",
323+
"▲ [WARNING] <<<<< console.warning() message >>>>>",
324+
]
325+
`);
326+
});
327+
});
309328
});

0 commit comments

Comments
 (0)