mirror of https://github.com/lukechilds/node.git
Browse Source
Add test for requiriing an invalid package path. PR-URL: https://github.com/nodejs/node/pull/9903 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>v4.x
Duy Le
8 years ago
committed by
Myles Borins
1 changed files with 9 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
require('../common'); |
||||
|
const assert = require('assert'); |
||||
|
|
||||
|
// Should be an invalid package path.
|
||||
|
assert.throws(() => require('package.json'), (err) => { |
||||
|
return err && err.code === 'MODULE_NOT_FOUND'; |
||||
|
}); |
Loading…
Reference in new issue