Skip to content

Commit 901f12c

Browse files
committed
Add to UPGRADING.md notes
1 parent 79061f3 commit 901f12c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

heft-plugins/heft-jest-plugin/UPGRADING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Upgrade notes for @rushstack/heft-jest-plugin
22

3+
### Version 1.3.0 (jest-environment-jsdom 30.3.0)
4+
5+
This release upgrades `jest-environment-jsdom` from 29.5.0 to 30.3.0, which ships with **jsdom 26** instead of jsdom 21. It also upgrades all other Jest packages (`@jest/core`, `jest-config`, etc.) to `~30.3.0`.
6+
7+
The `punycode` injection workaround introduced in a prior release (which redirected `jest-environment-jsdom` through a patched wrapper to suppress `DEP0040` deprecation warnings on Node ≥ 22) has been removed. jsdom 26 no longer triggers `DEP0040`.
8+
9+
**Breaking changes from Jest 29 → Jest 30 that may affect your tests:**
10+
11+
- **`window.location` is now immutable.** `Object.defineProperty(window, 'location', { value: ... })` throws a `TypeError` in jsdom 26. Use `window.history.pushState()` or `window.history.replaceState()` to change the URL in tests instead.
12+
13+
- **Deprecated matcher aliases have been removed.** Replace usages before upgrading:
14+
- `expect(fn).toBeCalled()``expect(fn).toHaveBeenCalled()`
15+
- `expect(fn).toBeCalledWith(...)``expect(fn).toHaveBeenCalledWith(...)`
16+
- `expect(fn).toReturn()``expect(fn).toHaveReturned()`
17+
- `expect(fn).toThrowError(msg)``expect(fn).toThrow(msg)`
18+
19+
- **Snapshots must be regenerated.** The error `cause` property is now included in snapshot output. Run `jest --updateSnapshot` after upgrading.
20+
21+
- **`toEqual()` no longer matches non-enumerable object properties** by default.
22+
23+
- **Node.js minimum is 18** (drops Node 14, 16, 19, 21). TypeScript minimum is 5.4.
24+
325
### Version 0.6.0
426
BREAKING CHANGE: The `testFiles` option in `config/jest.config.json` should now specify the path to compiled CommonJS files, *not* TypeScript source files. Snapshot resolution depends on the presence of source maps in the output folder.
527

0 commit comments

Comments
 (0)