-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: improve buffer.includes error verification tests #11203
Conversation
assert.throws(function() { | ||
assert.throws(() => { | ||
b.includes(() => {}); | ||
}, /^TypeError: "val" argument must be string, number, Buffer or Uint8Array$/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put this regular expression in a variable so that it can be reused.
Please prefix the PR with test,buffer tag. Commit message guidelines |
a694127
to
83c8f29
Compare
Gotta mildly disagree with that. Just (EDIT: But if someone did put |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI is green.
Looks like there was an issue with the build server, it started returning http 502, now that its back the above build has disappeared, it's returning http 404. Does CI need to be kicked-off again? |
@Trott haha. It was supposed to be test or buffer. I wasn't sure what was appropriate for this case. Anyway test it is 😄 |
CI failures on freebsd are unrelated |
* verify error message * use arrow funcs PR-URL: #11203 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 1544d8f |
This commit is breaking tests in v7.x, maybe because of some |
* verify error message * use arrow funcs PR-URL: nodejs#11203 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the |
I am backporting this with #12270 |
* verify error message * use arrow funcs PR-URL: nodejs/node#11203 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Verify specific errors thrown by
buffer.includes
and change tests to use arrow functions as per latest testing guide.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
tests, buffer