import { BatchedLogger } from "."; // import * as BatchedLogger from "./BatchedLogger"; describe("BatchedLogger", () => { describe("Given that the logger is not initialized", () => { it("should throw an error when calling addToBatch", () => { expect(() => { BatchedLogger.addToBatch("type", null); }).toThrow(); }); it("should throw an error when calling flush", async () => { try { await BatchedLogger.flush(); } catch (e) { expect(e instanceof Error).toBeTruthy(); } }); }); });