mirror of
https://github.com/xlorepdarkhelm/numinar-coding-project.git
synced 2026-09-06 00:18:25 -04:00
24 lines
735 B
TypeScript
24 lines
735 B
TypeScript
/**
|
|
* @file logger.test.ts
|
|
* Unit tests for the logger utility.
|
|
* Ensures logger methods do not throw and are properly typed.
|
|
*/
|
|
import { logger } from "../../utils/logger";
|
|
|
|
describe("logger utility", () => {
|
|
beforeAll(() => {
|
|
jest.spyOn(console, "info").mockImplementation(() => {});
|
|
jest.spyOn(console, "debug").mockImplementation(() => {});
|
|
jest.spyOn(console, "error").mockImplementation(() => {});
|
|
});
|
|
it("logs info messages", () => {
|
|
expect(() => logger.info("test info")).not.toThrow();
|
|
});
|
|
it("logs debug messages", () => {
|
|
expect(() => logger.debug("test debug")).not.toThrow();
|
|
});
|
|
it("logs error messages", () => {
|
|
expect(() => logger.error("test error")).not.toThrow();
|
|
});
|
|
});
|