| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 79e1831 commit 9bf8874
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,12 +8,9 @@ const eol = common.isWindows ? '\r\n' : '\n'; | |||
| 8 | 8 | ||
| 9 | 9 | assert.strictEqual(os.EOL, eol); | |
| 10 | 10 | ||
| 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); | ||
| 17 | 14 | ||
| 18 | 15 | const foo = 'foo'; | |
| 19 | 16 | Object.defineProperties(os, { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments