-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib,test: use regular expression literals
Replace RegExp constructors with regular expression literals where possible. PR-URL: #12807 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
- Loading branch information
Showing
12 changed files
with
25 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,7 @@ assert.strictEqual(url.searchParams, oldParams); // [SameObject] | |
// non-writable property should throw. | ||
// Note: this error message is subject to change in V8 updates | ||
assert.throws(() => url.origin = 'http://foo.bar.com:22', | ||
new RegExp('TypeError: Cannot set property origin of' + | ||
' \\[object URL\\] which has only a getter')); | ||
/TypeError: Cannot set property origin of \[object URL\] which has only a getter$/); | ||
assert.strictEqual(url.origin, 'http://foo.bar.com:21'); | ||
assert.strictEqual(url.toString(), | ||
'http://user:[email protected]:21/aaa/zzz?l=25#test'); | ||
|
@@ -120,8 +119,7 @@ assert.strictEqual(url.hash, '#abcd'); | |
// non-writable property should throw. | ||
// Note: this error message is subject to change in V8 updates | ||
assert.throws(() => url.searchParams = '?k=88', | ||
new RegExp('TypeError: Cannot set property searchParams of' + | ||
' \\[object URL\\] which has only a getter')); | ||
/^TypeError: Cannot set property searchParams of \[object URL\] which has only a getter$/); | ||
assert.strictEqual(url.searchParams, oldParams); | ||
assert.strictEqual(url.toString(), | ||
'https://user2:[email protected]:23/aaa/bbb?k=99#abcd'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters