#jest
Read more stories on Hashnode
Articles with this tag
describe("outer", () => { describe("inner", () => { let spy: jest.SpyInstance; beforeAll(() => { spy = jest.spyOn(global.console,...
Instead of it("doesn't work", async () => { const fn = async () => { throw new Error(); }; expect(await fn()).toThrow(); }); Use it("does...