| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3e63429 commit b6e174b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,10 +24,9 @@ require('../common'); | |||
| 24 | 24 | const assert = require('assert'); | |
| 25 | 25 | const fixtures = require('../common/fixtures'); | |
| 26 | 26 | ||
| 27 | - try { | ||
| 27 | + assert.throws(function() { | ||
| 28 | 28 | require(fixtures.path('invalid.json')); | |
| 29 | - } catch (err) { | ||
| 30 | - assert.ok( | ||
| 31 | - /test[/\\]fixtures[/\\]invalid\.json: /.test(err.message), | ||
| 32 | - `require() json error should include path: ${err.message}`); | ||
| 33 | - } | ||
| 29 | + }, { | ||
| 30 | + name: 'SyntaxError', | ||
| 31 | + message: /test[/\\]fixtures[/\\]invalid\.json: /, | ||
| 32 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments