Skip to content

Commit a5b03db

Browse files
committed
Add links to code that is affected by the breaking changes
1 parent 43e9dd1 commit a5b03db

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

docs/guides/migration-guide.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@ breadcrumb: migrating
77
## Sinon 19
88

99
A breaking change is that Fake Timers 13 now fake all timers by default. Previously
10-
a couple of timers were explicitly ignored, but this no longer applies.
11-
If you want the old behavior, specify the `toFake` option and leave the name
12-
of the timers giving you trouble.
10+
Node's `nextTick()` and `Window#queueMicroTask()` were explicitly skipped, which
11+
was quite confusing to some. This typically might affect `async` tests where
12+
you rely on some Node function that invokes `nextTick` under the hood. See
13+
[issue #2619](https://github.com/sinonjs/sinon/issues/2619) for such an example
14+
and [a suggestion on how one could employ `clock#runToLastAsync()`](https://github.com/fatso83/usefaketimers-bug-reproduction/commit/54c812d)
15+
in asynchronous tests that stopped resolving in Sinon 19.
16+
17+
_If you want the old behavior, specify the timers you want to fake in the `toFake`
18+
option and leave out the name of the timers giving you trouble_.
1319

1420
The new version of fake-timers also no longer creating dates using the original Date
15-
class, but a subclass (proxy). This should not matter unless you are doing some kind
16-
of identity checks on the constructor: functionally they are the same.
21+
class, but a _subclass_ (proxy). This should not matter unless you are doing some kind
22+
of identity checks on the constructor: functionally they are the same, but if you
23+
creating Date objects before installing the fake timers, `instanceof` checks
24+
will not pass ([fake-timers#504](https://github.com/sinonjs/fake-timers/issues/504)).
1725

1826
Removal of `legacyRoutes` option that was enabled in a previous `nise` version as the
1927
underlying library, `path-to-regexp`, had a fundamental change to its parsing that

0 commit comments

Comments
 (0)