diff options
Diffstat (limited to 'test/sequential/test-module-loading.js')
-rw-r--r-- | test/sequential/test-module-loading.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index f500700f9d..61746a282f 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -69,6 +69,13 @@ assert.strictEqual(threeFolder, threeIndex); assert.notStrictEqual(threeFolder, three); console.error('test package.json require() loading'); +assert.throws( + function() { + require('../fixtures/packages/invalid'); + }, + /^SyntaxError: Error parsing \S+: Unexpected token , in JSON at position 1$/ +); + assert.strictEqual(require('../fixtures/packages/index').ok, 'ok', 'Failed loading package'); assert.strictEqual(require('../fixtures/packages/main').ok, 'ok', |