-
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: 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 <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Landed in 901cb8c |
This is failing in |
This depends on semver-major #10236 which adds support for |
OK |
PR-URL: nodejs#11122 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Adding |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test