Skip to content

Commit 9e470b5

Browse files
committed
chore: fix tests on windows
1 parent 7a78abd commit 9e470b5

7 files changed

+7
-8
lines changed

test/e2e/server.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ test.describe("server option", () => {
338338

339339
expect(
340340
normalizeOptions(createServerSpy.getCall(0).args[0]),
341-
).toMatchSnapshotWithArray();
341+
).toMatchSnapshotWithArray("normalized options");
342342
expect(response.status()).toBe(200);
343343
await expect(page).toHaveScreenshot();
344344
expect(
@@ -422,7 +422,7 @@ test.describe("server option", () => {
422422

423423
expect(
424424
normalizeOptions(createServerSpy.getCall(0).args[0]),
425-
).toMatchSnapshotWithArray();
425+
).toMatchSnapshotWithArray("normalized options");
426426
expect(response.status()).toBe(200);
427427
await expect(page).toHaveScreenshot();
428428
expect(
@@ -515,7 +515,7 @@ test.describe("server option", () => {
515515

516516
expect(
517517
normalizeOptions(createServerSpy.getCall(0).args[0]),
518-
).toMatchSnapshotWithArray();
518+
).toMatchSnapshotWithArray("normalized options");
519519
expect(response.status()).toBe(200);
520520
await expect(page).toHaveScreenshot();
521521
expect(
@@ -585,7 +585,7 @@ test.describe("server option", () => {
585585

586586
expect(
587587
normalizeOptions(createServerSpy.getCall(0).args[0]),
588-
).toMatchSnapshotWithArray();
588+
).toMatchSnapshotWithArray("normalized options");
589589
expect(response.status()).toBe(200);
590590
await expect(page).toHaveScreenshot();
591591
expect(
@@ -655,7 +655,7 @@ test.describe("server option", () => {
655655

656656
expect(
657657
normalizeOptions(createServerSpy.getCall(0).args[0]),
658-
).toMatchSnapshotWithArray();
658+
).toMatchSnapshotWithArray("normalized options");
659659
expect(response.status()).toBe(200);
660660
await expect(page).toHaveScreenshot();
661661
expect(

test/helpers/playwright-custom-expects.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ const { test, expect, mergeExpects } = require("@playwright/test");
1212
* @returns {string} a new string with all EOL markers replaced
1313
* @private
1414
*/
15-
const normalizeLineEndings = (input) => {
16-
return input.replace(/(\r\n|\n|\r)/gmu, os.EOL);
17-
};
15+
const normalizeLineEndings = (input) =>
16+
input.replace(/(\r\n|\n|\r)/gmu, os.EOL);
1817

1918
/**
2019
* Custom Playwright matcher to match a snapshot with an array.

0 commit comments

Comments
 (0)