diff --git a/src/core/log.spec.ts b/src/util/log.spec.ts similarity index 81% rename from src/core/log.spec.ts rename to src/util/log.spec.ts index 5363a002c841e1df759e4594ccd1bf8180fc0fa1..404f6bb98a8836acf82269ca8a58e5128adde60f 100644 --- a/src/core/log.spec.ts +++ b/src/util/log.spec.ts @@ -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"); + }); + });