Upload files to "tests/utils"

This commit is contained in:
2026-07-03 02:47:17 +00:00
parent f0147f09c1
commit 2bd884708c
5 changed files with 971 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
import { describe, expect, test } from "bun:test";
import { logUtil } from "../../src/utils/logger";
describe("logUtil", () => {
test("log is a function", () => {
expect(typeof logUtil.log).toBe("function");
});
test("info is a function", () => {
expect(typeof logUtil.info).toBe("function");
});
test("warn is a function", () => {
expect(typeof logUtil.warn).toBe("function");
});
test("error is a function", () => {
expect(typeof logUtil.error).toBe("function");
});
test("log does not throw", () => {
expect(() => logUtil.log("test message", { foo: "bar" })).not.toThrow();
});
test("info does not throw", () => {
expect(() => logUtil.info("test info")).not.toThrow();
});
test("warn does not throw", () => {
expect(() => logUtil.warn("test warning")).not.toThrow();
});
test("error does not throw", () => {
expect(() => logUtil.error("test error", new Error("boom"))).not.toThrow();
});
});