Fix package version exposing
This commit is contained in:
parent
07b6ad3731
commit
7bb233e269
2
index.js
2
index.js
|
@ -25,7 +25,7 @@ try {
|
|||
if (process.versions.node < '0.6') {
|
||||
exports.version = JSON.parse(fs.readFileSync(__dirname + '/package.json')).version;
|
||||
} else {
|
||||
exports.version = require('../package').version;
|
||||
exports.version = require('./package').version;
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
var juggling = require('../index');
|
||||
require('./spec_helper').init(module.exports);
|
||||
|
||||
it('should expose version', function (test) {
|
||||
console.log('version:', juggling.version);
|
||||
test.ok(juggling.version);
|
||||
test.done();
|
||||
});
|
Loading…
Reference in New Issue