Skip to content

Commit e7a99ae

Browse files
committed
tests(utils): add test for global regex replace
1 parent 13c9bfd commit e7a99ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/utils/test/saved-reports.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ describe('replaceUrlPatterns', () => {
2828
it('should support regex flags', () => {
2929
expect(replaceUrlPatterns('localhost', ['s/lOcAlHoSt/pwned/'])).toEqual('localhost');
3030
expect(replaceUrlPatterns('localhost', ['s/lOcAlHoSt/pwned/i'])).toEqual('pwned');
31+
expect(replaceUrlPatterns('localhost', ['s/L/$/i'])).toEqual('$ocalhost');
32+
expect(replaceUrlPatterns('localhost', ['s/L/$/ig'])).toEqual('$oca$host');
3133
});
3234

3335
it('should allow alternate control characters and backreferences', () => {

0 commit comments

Comments
 (0)