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 9bf8874

Browse filesBrowse files
Trottevanlucas
authored andcommitted
test: make test-os-eol 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 `TypeError`. 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 79e1831 commit 9bf8874
Copy full SHA for 9bf8874

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-os-eol.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-os-eol.js
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ const eol = common.isWindows ? '\r\n' : '\n';
88

99
assert.strictEqual(os.EOL, eol);
1010

11-
common.expectsError(function() {
12-
os.EOL = 123;
13-
}, {
14-
type: TypeError,
15-
message: /^Cannot assign to read only property 'EOL' of object '#<Object>'$/
16-
});
11+
// Test that the `Error` is a `TypeError` but do not check the message as it
12+
// varies between different JavaScript engines.
13+
assert.throws(function() { os.EOL = 123; }, TypeError);
1714

1815
const foo = 'foo';
1916
Object.defineProperties(os, {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.