Commit 7e0a04f2 authored by Rafael Dias's avatar Rafael Dias

add log and update it's location

Signed-off-by: Rafael Dias's avatarrafaelcosc <rpd17@inf.ufpr.br>
parent b5a39e21
Pipeline #21461 passed with stages
in 1 minute and 40 seconds
......@@ -19,7 +19,7 @@
*/
import { expect } from "chai";
import { Log } from "../util/log";
import { Log } from "./log";
describe("log class", () => {
......@@ -35,10 +35,16 @@ describe("log class", () => {
expect(logLevelEmpty.getLogLevel()).to.be.equals("error");
});
it("should modifiy logFile to ./blendb.log if empty file", () => {
it("should modifiy logFile to stderr if empty file", () => {
process.env.BLENDB_LOG_FILE = "";
const LogFileEmpty = new Log();
expect(LogFileEmpty.getLogFile()).to.be.equals("stderr");
});
it("should modifiy logFile to stderr if file does not exist", () => {
process.env.BLENDB_LOG_FILE = "norepo/test/shalnotexist";
const LogFileEmpty = new Log();
expect(LogFileEmpty.getLogFile()).to.be.equals("stderr");
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment