We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a801ffb commit 6502427Copy full SHA for 6502427
test/parallel/test-require-exceptions.js
@@ -1,16 +1,16 @@
1
'use strict';
2
-var common = require('../common');
3
-var assert = require('assert');
+const common = require('../common');
+const assert = require('assert');
4
5
// A module with an error in it should throw
6
assert.throws(function() {
7
require(common.fixturesDir + '/throws_error');
8
-});
+}, /^Error: blah$/);
9
10
// Requiring the same module again should throw as well
11
12
13
14
15
// Requiring a module that does not exist should throw an
16
// error with its `code` set to MODULE_NOT_FOUND
0 commit comments