| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f120658 commit c6a814c
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -441,6 +441,7 @@ class AssertionError extends Error { | |||
| 441 | 441 | ||
| 442 | 442 | this.generatedMessage = !message; | |
| 443 | 443 | ObjectDefineProperty(this, 'name', { | |
| 444 | + __proto__: null, | ||
| 444 | 445 | value: 'AssertionError [ERR_ASSERTION]', | |
| 445 | 446 | enumerable: false, | |
| 446 | 447 | writable: true, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | - require('../common'); | ||
| 3 | + const common = require('../common'); | ||
| 4 | 4 | const assert = require('assert'); | |
| 5 | 5 | ||
| 6 | 6 | // No args | |
@@ -38,3 +38,7 @@ assert.throws(() => { | |||
| 38 | 38 | name: 'TypeError', | |
| 39 | 39 | message: 'custom message' | |
| 40 | 40 | }); | |
| 41 | + | ||
| 42 | + Object.prototype.get = common.mustNotCall(); | ||
| 43 | + assert.throws(() => assert.fail(''), { code: 'ERR_ASSERTION' }); | ||
| 44 | + delete Object.prototype.get; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments