| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cd7cee5 commit 0ac87c2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -60,29 +60,26 @@ assert.throws(() => { | |||
| 60 | 60 | test_error.throwTypeError(); | |
| 61 | 61 | }, /^TypeError: type error$/); | |
| 62 | 62 | ||
| 63 | - assert.throws( | ||
| 63 | + common.expectsError( | ||
| 64 | 64 | () => test_error.throwErrorCode(), | |
| 65 | - common.expectsError({ | ||
| 65 | + { | ||
| 66 | 66 | code: 'ERR_TEST_CODE', | |
| 67 | 67 | message: 'Error [error]' | |
| 68 | - }) | ||
| 69 | - ); | ||
| 68 | + }); | ||
| 70 | 69 | ||
| 71 | - assert.throws( | ||
| 70 | + common.expectsError( | ||
| 72 | 71 | () => test_error.throwRangeErrorCode(), | |
| 73 | - common.expectsError({ | ||
| 72 | + { | ||
| 74 | 73 | code: 'ERR_TEST_CODE', | |
| 75 | 74 | message: 'RangeError [range error]' | |
| 76 | - }) | ||
| 77 | - ); | ||
| 75 | + }); | ||
| 78 | 76 | ||
| 79 | - assert.throws( | ||
| 77 | + common.expectsError( | ||
| 80 | 78 | () => test_error.throwTypeErrorCode(), | |
| 81 | - common.expectsError({ | ||
| 79 | + { | ||
| 82 | 80 | code: 'ERR_TEST_CODE', | |
| 83 | 81 | message: 'TypeError [type error]' | |
| 84 | - }) | ||
| 85 | - ); | ||
| 82 | + }); | ||
| 86 | 83 | ||
| 87 | 84 | let error = test_error.createError(); | |
| 88 | 85 | assert.ok(error instanceof Error, 'expected error to be an instance of Error'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments