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

+1-1
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

+1-1
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

+1-1
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)