Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
use console.log for version log (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperata committed Jun 19, 2017
1 parent 5c5285e commit 69f4cc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 47 deletions.
4 changes: 2 additions & 2 deletions bin/bst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
45 changes: 0 additions & 45 deletions test/bin/bst-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 69f4cc6

Please sign in to comment.