@node-lightning/logger
Version:
Logging tool for Node-Lightning applications
17 lines (15 loc) • 507 B
text/typescript
import { expect } from "chai";
import sinon from "sinon";
import { ConsoleTransport } from "../../lib/transports/console-transport";
describe("ConsoleTransport", () => {
describe(".write", () => {
it("should write to the console", () => {
const stub = {
log: sinon.stub(),
};
const sut = new ConsoleTransport(stub as any);
sut.write("hello");
expect(stub.log.args[0]).to.deep.equal(["hello"]);
});
});
});