Fix package version exposing

This commit is contained in:
Anatoliy Chakkaev 2013-02-19 16:32:21 +08:00
parent 07b6ad3731
commit 7bb233e269
2 changed files with 9 additions and 1 deletions

View File

@ -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) {}

8
test/jugglingdb_test.js Normal file
View File

@ -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();
});