diff --git a/bin/bst.ts b/bin/bst.ts index f83104ab..0be74056 100644 --- a/bin/bst.ts +++ b/bin/bst.ts @@ -5,8 +5,8 @@ import {LoggingHelper} from "../lib/core/logging-helper"; let Logger = "BST"; -LoggingHelper.info(Logger, "BST: v" + Global.version() + " Node: " + process.version); -LoggingHelper.info(Logger, ""); +console.log("BST: v" + Global.version() + " Node: " + process.version); +console.log(""); let nodeMajorVersion = parseInt(process.version.substr(1, 2)); diff --git a/test/bin/bst-test.ts b/test/bin/bst-test.ts index c44d1920..0ad3c8db 100644 --- a/test/bin/bst-test.ts +++ b/test/bin/bst-test.ts @@ -188,51 +188,6 @@ describe("bst", function() { }); }); - describe("Version Check", function() { - let originalVersion: string = null; - beforeEach(function () { - originalVersion = process.version; - mockery.enable(); - mockery.warnOnUnregistered(false); - }); - - afterEach(function () { - setVersion(originalVersion); - mockery.disable(); - }); - - it("Shows version for bst and node", function() { - process.argv = command("node bst.js test"); - setVersion("v4.0.0"); - - let mockProcess = sandbox.mock(process); - const packageInfo: any = require("../../package.json"); - - return new Promise((resolve, reject) => { - mockProcess.expects("exit").once().withExactArgs(1); - mockery.registerMock("../lib/core/logging-helper", { - "LoggingHelper": { - info: function (level: any, message: string) { - console.log(message); - const expectedLog = "BST: v" + packageInfo.version + " Node: v4.0.0"; - try { - assert.equal(expectedLog, message); - } catch (error) { - reject(error); - } - resolve(); - }, - error: function (level: any, message: string) { - reject(assert.fail("This should not be called!")); - } - } - }); - - NodeUtil.run("../../bin/bst.js"); - }); - }); - }); - describe("Version Check", function() { let originalVersion: string = null; beforeEach(function () {