test: test-assert.js add 2nd argument to throws#11061
Closed
Marlena wants to merge 1 commit intonodejs:masterfrom
Closed
test: test-assert.js add 2nd argument to throws#11061Marlena wants to merge 1 commit intonodejs:masterfrom
Marlena wants to merge 1 commit intonodejs:masterfrom
Conversation
cjihrig
reviewed
Jan 29, 2017
|
|
||
| { | ||
| const re1 = /a/; | ||
| const re1 = /a/g; |
Contributor
Author
|
regexp.lastIndex requires that /g be used with a regular expression. See
the description section of lastIndex on mdn:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex
LastIndex is called for the block on line 106.
In order for the regex supplied to makeBlock to match, it needs a /g.
…On Sat, Jan 28, 2017 at 4:56 PM, Colin Ihrig ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In test/parallel/test-assert.js
<#11061 (review)>:
> @@ -102,9 +102,11 @@ assert.throws(makeBlock(a.deepEqual, /a/igm, /a/im),
/^AssertionError: \/a\/gim deepEqual \/a\/im$/);
{
- const re1 = /a/;
+ const re1 = /a/g;
Why add the g?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11061 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVBCgPzSthb7fKIDHQPDSSZFbEohTQKks5rW-PJgaJpZM4LwqUQ>
.
|
addaleax
approved these changes
Jan 29, 2017
cjihrig
approved these changes
Jan 29, 2017
Contributor
cjihrig
left a comment
There was a problem hiding this comment.
Thanks for the link. It looks like the test can technically pass without adding the g flag, but I agree it should be included.
Member
|
Nit: You don't need to make the change I'm about to suggest, but the |
lpinca
approved these changes
Jan 29, 2017
Member
Member
|
Only CI failure is a known-flaky documented at #11041. So CI looks good. |
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
Jan 31, 2017
PR-URL: nodejs#11061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Member
|
Landed in 262400f. |
Contributor
Author
|
Yay!!!!
…On Tue, Jan 31, 2017 at 11:56 AM Rich Trott ***@***.***> wrote:
Closed #11061 <#11061>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11061 (comment)>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAVBClFifPL3jl7_obnGqTEB-A3ojo1zks5rX5IHgaJpZM4LwqUQ>
.
|
evanlucas
pushed a commit
that referenced
this pull request
Jan 31, 2017
PR-URL: #11061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
jasnell
pushed a commit
that referenced
this pull request
Mar 7, 2017
PR-URL: #11061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
jasnell
pushed a commit
that referenced
this pull request
Mar 7, 2017
PR-URL: #11061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Mar 9, 2017
PR-URL: #11061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Mar 9, 2017
PR-URL: #11061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test