Initial Commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { describe, expect, it } from "@suaveplan/testing/runner";
|
||||
import { noopLogger } from "./noop.js";
|
||||
|
||||
describe("noopLogger", () => {
|
||||
it("debug/info/warn/error silently accept message + context", {
|
||||
timeout: 5000,
|
||||
}, () => {
|
||||
expect(noopLogger.debug("d", { k: 1 })).toBeUndefined();
|
||||
expect(noopLogger.info("i", { k: 2 })).toBeUndefined();
|
||||
expect(noopLogger.warn("w", { k: 3 })).toBeUndefined();
|
||||
expect(noopLogger.error("e", { k: 4 })).toBeUndefined();
|
||||
});
|
||||
|
||||
it("methods accept message-only calls", { timeout: 5000 }, () => {
|
||||
expect(noopLogger.debug("d")).toBeUndefined();
|
||||
expect(noopLogger.info("i")).toBeUndefined();
|
||||
expect(noopLogger.warn("w")).toBeUndefined();
|
||||
expect(noopLogger.error("e")).toBeUndefined();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user