Skip to content

Commit 2e2e802

Browse files
Trottevanlucas
authored andcommitted
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: #16272 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 7a53783 commit 2e2e802

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/parallel/test-buffer-slow.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ try {
3434
assert.strictEqual(
3535
SlowBuffer(buffer.kMaxLength).length, buffer.kMaxLength);
3636
} catch (e) {
37-
assert.strictEqual(e.message, 'Array buffer allocation failed');
37+
// Don't match on message as it is from the JavaScript engine. V8 and
38+
// ChakraCore provide different messages.
39+
assert.strictEqual(e.name, 'RangeError');
3840
}
3941

4042
// should work with number-coercible values

0 commit comments

Comments
 (0)