|
1 | 1 | // Currently in sync with Node.js test/parallel/test-assert-async.js |
2 | 2 | // https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b |
3 | 3 |
|
| 4 | +// [browserify] |
| 5 | +// Most `err.message` and `err.stack` tests are commented out because they are |
| 6 | +// inconsistent between browsers. |
| 7 | +// |
| 8 | +// `err.operator` tests are commented out because its always `undefined` in IE. |
| 9 | +// If we drop IE support we can uncomment these tests. |
| 10 | + |
4 | 11 | 'use strict'; |
5 | 12 | const common = require('../common'); |
6 | 13 | const assert = require('../../assert'); |
@@ -78,7 +85,6 @@ const invalidThenableFunc = () => { |
78 | 85 | assert.strictEqual(err.code, 'ERR_ASSERTION'); |
79 | 86 | // assert.strictEqual(err.message, |
80 | 87 | // 'Missing expected rejection (mustNotCall).'); |
81 | | - // [browserify] This will be undefined in IE |
82 | 88 | // assert.strictEqual(err.operator, 'rejects'); |
83 | 89 | assert.ok(!common.includes(err.stack, 'at Function.rejects')); |
84 | 90 | return true; |
@@ -202,7 +208,6 @@ promises.push(assert.rejects( |
202 | 208 | assert.strictEqual(err.code, 'ERR_ASSERTION'); |
203 | 209 | assert.strictEqual(err.actual, actual); |
204 | 210 | // assert.strictEqual(err.operator, 'rejects'); |
205 | | - // [browserify] Don't worry if the stack is less reliable |
206 | 211 | // assert(/rejects/.test(err.stack)); |
207 | 212 | return true; |
208 | 213 | }; |
|
0 commit comments