Skip to content

Commit

Permalink
test: 添加 not.toHaveBeenCalled 断言
Browse files Browse the repository at this point in the history
  • Loading branch information
haixiangyan authored and haixiangyan committed Apr 28, 2022
1 parent 5fdd793 commit acbea73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/utils/after1000ms.test.ts
Expand Up @@ -9,6 +9,8 @@ describe("after1000ms", () => {
jest.spyOn(global, "setTimeout");
const callback = jest.fn();

expect(callback).not.toHaveBeenCalled();

after1000ms(callback);

jest.runAllTimers();
Expand Down

0 comments on commit acbea73

Please sign in to comment.