test: make test-buffer-slow engine agnostic
Do not check the error message if it is generated by the JavaScript engine (V8, ChakraCore, etc.). Do confirm that it is a `RangeError`. PR-URL: https://github.com/nodejs/node/pull/16272 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
parent
829d8f1cd0
commit
7baf261cfc
@ -34,7 +34,9 @@ try {
|
||||
assert.strictEqual(
|
||||
SlowBuffer(buffer.kMaxLength).length, buffer.kMaxLength);
|
||||
} catch (e) {
|
||||
assert.strictEqual(e.message, 'Array buffer allocation failed');
|
||||
// Don't match on message as it is from the JavaScript engine. V8 and
|
||||
// ChakraCore provide different messages.
|
||||
assert.strictEqual(e.name, 'RangeError');
|
||||
}
|
||||
|
||||
// should work with number-coercible values
|
||||
|
Loading…
x
Reference in New Issue
Block a user