Browse Source

cli: injectable command to run in tests

Herbert Vojčík 10 years ago
parent
commit
f981db85cb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      external/amber-cli/test/amberVersionTest.js

+ 2 - 2
external/amber-cli/test/amberVersionTest.js

@@ -3,12 +3,12 @@
 var assert = require('assert'),
     shelljs = require('shelljs');
 
-var AMBER_VERSION_COMMAND = './support/amber-cli.js version';
+process.env.AMBER_CLI = process.env.AMBER_CLI || "node ./support/amber-cli.js";
 
 describe("amber version", function () {
     it("should return line with amber version", function () {
         this.timeout(7000);
-        var amberResult = shelljs.exec("node " + AMBER_VERSION_COMMAND, {silent: true}).output;
+        var amberResult = shelljs.exec(process.env.AMBER_CLI + " version", {silent: true}).output;
 
         assert.ok(amberResult.match(/[Aa]mber/));
         assert.ok(amberResult.match(/version/));