diff options
author | isaacs <i@izs.me> | 2011-07-21 04:39:23 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-07-21 04:39:23 +0400 |
commit | 588d885e81dec667920383ac7246daceeb7f99fd (patch) | |
tree | 37408ebc82599cb8f21072037eef1c91da9cdd4b /test | |
parent | 1b0e054737b207977981e0fc818b013ba8bb0caa (diff) |
Close #1357 Load json files with require()
Signed off by everybody.
Diffstat (limited to 'test')
-rw-r--r-- | test/simple/test-module-loading.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/simple/test-module-loading.js b/test/simple/test-module-loading.js index 736a1e2e49a..4d683ebf27d 100644 --- a/test/simple/test-module-loading.js +++ b/test/simple/test-module-loading.js @@ -213,6 +213,13 @@ var child = require('../fixtures/module-require/child/'); assert.equal(child.loaded, parent.loaded); +// #1357 Loading JSON files with require() +var json = require('../fixtures/packages/main/package.json'); +assert.deepEqual(json, { name: 'package-name', + version: '1.2.3', + main: 'package-main-module' }); + + process.addListener('exit', function() { assert.ok(common.indirectInstanceOf(a.A, Function)); assert.equal('A done', a.A()); |