Skip to content

Commit f3390fe

Browse files
authored
chore: use u flag for regexes (#12249)
1 parent 4715c09 commit f3390fe

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

e2e/__tests__/declarationErrors.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const extractMessage = (str: string) =>
1919
)
2020
.match(
2121
// all lines from the first to the last mentioned "describe" after the "●" line
22-
/(.|\n)*?\n(?<lines>.*describe((.|\n)*describe)*.*)(\n|$)/im,
22+
/(.|\n)*?\n(?<lines>.*describe((.|\n)*describe)*.*)(\n|$)/imu,
2323
)?.groups?.lines ?? '',
2424
);
2525

packages/jest-repl/src/__tests__/jest_repl.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('Repl', () => {
2929
env: process.env,
3030
});
3131
expect(output.stderr.trim()).toBe('');
32-
expect(output.stdout.trim()).toMatch(//);
32+
expect(output.stdout.trim()).toMatch(//u);
3333
});
3434
});
3535
});

packages/jest-reporters/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export const wrapAnsiString = (
278278
return string;
279279
}
280280

281-
const ANSI_REGEXP = /[\u001b\u009b]\[\d{1,2}m/g;
281+
const ANSI_REGEXP = /[\u001b\u009b]\[\d{1,2}m/gu;
282282
const tokens = [];
283283
let lastIndex = 0;
284284
let match;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy