Skip to content

Commit b6bc25d

Browse files
committed
add another string.raw
1 parent 3a5c6fd commit b6bc25d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/tests-unit/tests/utils/regex.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ describe("getCrossPlatformPathRegex", () => {
3232
});
3333

3434
it("should return cross-platform paths without escaping special characters", () => {
35-
const regex = getCrossPlatformPathRegex("\\./middleware\\.(mjs|cjs)", {
36-
escape: false,
37-
});
35+
const regex = getCrossPlatformPathRegex(
36+
String.raw`\./middleware\.(mjs|cjs)`,
37+
{ escape: false },
38+
);
3839
expect(regex.source).toEqual(String.raw`\.(?:\/|\\)middleware\.(mjs|cjs)`);
3940
});
4041
});

0 commit comments

Comments
 (0)