| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 26d61c3 commit af5c4a9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,16 +1,16 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - var common = require('../common'); | ||
| 3 | - var assert = require('assert'); | ||
| 2 | + const common = require('../common'); | ||
| 3 | + const assert = require('assert'); | ||
| 4 | 4 | ||
| 5 | 5 | // A module with an error in it should throw | |
| 6 | 6 | assert.throws(function() { | |
| 7 | 7 | require(common.fixturesDir + '/throws_error'); | |
| 8 | - }); | ||
| 8 | + }, /^Error: blah$/); | ||
| 9 | 9 | ||
| 10 | 10 | // Requiring the same module again should throw as well | |
| 11 | 11 | assert.throws(function() { | |
| 12 | 12 | require(common.fixturesDir + '/throws_error'); | |
| 13 | - }); | ||
| 13 | + }, /^Error: blah$/); | ||
| 14 | 14 | ||
| 15 | 15 | // Requiring a module that does not exist should throw an | |
| 16 | 16 | // error with its `code` set to MODULE_NOT_FOUND | |
| Back | FazBrowse Home | New Git URL |
0 commit comments