Fix node test helper for runtime/api changes

This commit is contained in:
Nick O'Leary
2015-11-12 09:12:14 +00:00
parent 8fb955e182
commit 93f5da325b
5 changed files with 194 additions and 382 deletions

View File

@@ -34,9 +34,9 @@ function init(userSettings) {
}
function version() {
var p = require(path.join(process.env.NODE_RED_HOME,"package.json")).version;
var p = require(path.join(__dirname,"..","..","package.json")).version;
/* istanbul ignore else */
if (fs.existsSync(path.join(process.env.NODE_RED_HOME,".git"))) {
if (fs.existsSync(path.join(__dirname,"..","..",".git"))) {
p += "-git";
}
return p;