| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ebd60fa commit f96ea47
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -319,7 +319,15 @@ assert.ifError = function ifError(err) { if (err) throw err; }; | |||
| 319 | 319 | ||
| 320 | 320 | // Expose a strict only variant of assert | |
| 321 | 321 | function strict(value, message) { | |
| 322 | - if (!value) innerFail(value, true, message, '==', strict); | ||
| 322 | + if (!value) { | ||
| 323 | + innerFail({ | ||
| 324 | + actual: value, | ||
| 325 | + expected: true, | ||
| 326 | + message, | ||
| 327 | + operator: '==', | ||
| 328 | + stackStartFn: strict | ||
| 329 | + }); | ||
| 330 | + } | ||
| 323 | 331 | } | |
| 324 | 332 | assert.strict = Object.assign(strict, assert, { | |
| 325 | 333 | equal: assert.strictEqual, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -753,6 +753,14 @@ common.expectsError( | |||
| 753 | 753 | assert.equal(Object.keys(assert).length, Object.keys(a).length); | |
| 754 | 754 | /* eslint-enable no-restricted-properties */ | |
| 755 | 755 | assert(7); | |
| 756 | + common.expectsError( | ||
| 757 | + () => assert(), | ||
| 758 | + { | ||
| 759 | + code: 'ERR_ASSERTION', | ||
| 760 | + type: assert.AssertionError, | ||
| 761 | + message: 'undefined == true' | ||
| 762 | + } | ||
| 763 | + ); | ||
| 756 | 764 | } | |
| 757 | 765 | ||
| 758 | 766 | common.expectsError( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments