-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: increase coverage of buffer #11122
Conversation
() => Buffer.alloc(9)[funx].apply(new Uint32Array(1), args), | ||
new RegExp('^TypeError: (?:"buffer" )?argument (must|should) be ' + | ||
'a 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.
Something like
const error = /Int/.test(funx) ?
/^TypeError: "buffer" argument must be a Buffer or Uint8Array$/ :
/^TypeError: argument should be a Buffer$/;
assert.throws(
() => Buffer.alloc(9)[funx].apply(new Uint32Array(1), args),
error
);
would probably be easier to read.
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 with @joyeecheung's formatting suggestion
OK, updated. |
PR-URL: #11122 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Landed in 901cb8c |
This is failing in |
This depends on semver-major #10236 which adds support for |
OK |
PR-URL: #11312 Backport-of: #11122 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
PR-URL: #11312 Backport-of: #11122 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
PR-URL: nodejs#11122 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Adding |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test