Skip to content

Commit

Permalink
style: modify callback name
Browse files Browse the repository at this point in the history
  • Loading branch information
hchlq committed May 22, 2022
1 parent 95c8364 commit 7db2797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/basic/mock-timer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ describe('sleep', () => {
})
```

上面的用例很简单:在 “快进时间” 之前检查 `callbacl` 没有被调用,调用 `jest.runAllTimers` 后,理论上 `callbacl` 会被执行一次。
上面的用例很简单:在 “快进时间” 之前检查 `callback` 没有被调用,调用 `jest.runAllTimers` 后,理论上 `callback` 会被执行一次。

然而,当我们跑这个用例时会发现最后一行的 `expect(callback).toHaveBeenCalledTimes(1);` 会报错:

Expand Down

0 comments on commit 7db2797

Please sign in to comment.