Skip to content

Commit 968f403

Browse files
committed
Improve formatting. Add note on fix in fake-timers@13.0.2
1 parent a5b03db commit 968f403

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

docs/guides/migration-guide.md

+14-8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ breadcrumb: migrating
66

77
## Sinon 19
88

9+
### All timers are stubbed by default
10+
911
A breaking change is that Fake Timers 13 now fake all timers by default. Previously
1012
Node's `nextTick()` and `Window#queueMicroTask()` were explicitly skipped, which
1113
was quite confusing to some. This typically might affect `async` tests where
@@ -17,15 +19,19 @@ in asynchronous tests that stopped resolving in Sinon 19.
1719
_If you want the old behavior, specify the timers you want to fake in the `toFake`
1820
option and leave out the name of the timers giving you trouble_.
1921

22+
### New implementation of the fake Date class
23+
2024
The new version of fake-timers also no longer creating dates using the original Date
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)).
25-
26-
Removal of `legacyRoutes` option that was enabled in a previous `nise` version as the
27-
underlying library, `path-to-regexp`, had a fundamental change to its parsing that
28-
made the option a no-op.
25+
class, but a _subclass_ (proxy). This should not matter _unless_ you are doing some kind
26+
of identity checks on the constructor: functionally they are the same.
27+
See ([fake-timers#504](https://github.com/sinonjs/fake-timers/issues/504)) for an
28+
example (which we ended up pushing a small fix for to make `instanceof` work as before).
29+
30+
### Removal of `useFakeServer({legacyRoutes: true})`
31+
32+
The `legacyRoutes` option that was enabled in a previous version has been removed.
33+
An underlying library, `path-to-regexp`, had a fundamental change to its parsing that
34+
made the option a no-op. This should not affect most users of Sinon.
2935

3036
## Sinon 18
3137

0 commit comments

Comments
 (0)