eu.astrogd.uptime-kuma-push.../index.test.ts
Package Directory ae0e03df34 Initial commit
2023-09-16 12:16:57 +02:00

18 lines
452 B
TypeScript

jest.spyOn(console, "log");
describe("index", () => {
beforeEach(() => {
jest.clearAllMocks();
});
it("should log hello world", async () => {
(console.log as jest.MockedFn<typeof console.log>).mockImplementation(() => {
return;
});
await import("./index");
expect(console.log).toHaveBeenCalledTimes(1);
expect(console.log).toHaveBeenLastCalledWith("Hello world!");
});
});