Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e2e802

Browse filesBrowse 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 <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>
1 parent 7a53783 commit 2e2e802
Copy full SHA for 2e2e802

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-buffer-slow.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-slow.js
+3-1Lines changed: 3 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.