Skip to content

Commit

Permalink
call out promises
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed May 11, 2020
1 parent 8d021c8 commit 21d726f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ Implements the `now` method of the [`Performance`](https://developer.mozilla.org

In order to support creating clocks based on separate or sandboxed environments (such as JSDOM), FakeTimers exports a factory method which takes single argument `global`, which it inspects to figure out what to mock and what features to support. When invoking this function with a global, you will get back an object with `timers`, `createClock` and `install` - same as the regular FakeTimers exports only based on the passed in global instead of the global environment.

## Promises and fake time

If you use a Promise library like Bluebird, note that you should either call `clock.runMicrotasks()` or make sure to _not_ mock `nextTick`.

## Running tests

FakeTimers has a comprehensive test suite. If you're thinking of contributing bug
Expand Down

0 comments on commit 21d726f

Please sign in to comment.