Skip to content

Commit

Permalink
chore: use u flag for regexes (#12249)
Browse files Browse the repository at this point in the history
  • Loading branch information
Biki-das committed Feb 5, 2022
1 parent 4715c09 commit f3390fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e2e/__tests__/declarationErrors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const extractMessage = (str: string) =>
)
.match(
// all lines from the first to the last mentioned "describe" after the "●" line
/●(.|\n)*?\n(?<lines>.*describe((.|\n)*describe)*.*)(\n|$)/im,
/●(.|\n)*?\n(?<lines>.*describe((.|\n)*describe)*.*)(\n|$)/imu,
)?.groups?.lines ?? '',
);

Expand Down
2 changes: 1 addition & 1 deletion packages/jest-repl/src/__tests__/jest_repl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Repl', () => {
env: process.env,
});
expect(output.stderr.trim()).toBe('');
expect(output.stdout.trim()).toMatch(//);
expect(output.stdout.trim()).toMatch(//u);
});
});
});
2 changes: 1 addition & 1 deletion packages/jest-reporters/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export const wrapAnsiString = (
return string;
}

const ANSI_REGEXP = /[\u001b\u009b]\[\d{1,2}m/g;
const ANSI_REGEXP = /[\u001b\u009b]\[\d{1,2}m/gu;
const tokens = [];
let lastIndex = 0;
let match;
Expand Down

0 comments on commit f3390fe

Please sign in to comment.