Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("registers willQuitEventHandler", async () => {
const handler = "expected handler";
willQuitHandler.mockReturnValueOnce(handler);
await popup();
expect(menubarMock.app.on).toHaveBeenCalledWith("will-quit", handler);
expect(willQuitHandler).toHaveBeenCalledWith(menubarMock.app);
});
it("registers willQuitEventHandler", async () => {
const handler = "expected handler";
willQuitHandler.mockReturnValueOnce(handler);
await popup();
expect(menubarMock.app.on).toHaveBeenCalledWith("will-quit", handler);
expect(willQuitHandler).toHaveBeenCalledWith(menubarMock.app);
});