chore(deps)(deps-dev): bump jest-environment-jsdom from 29.7.0 to 30.4.1#11
chore(deps)(deps-dev): bump jest-environment-jsdom from 29.7.0 to 30.4.1#11dependabot[bot] wants to merge 1 commit into
Conversation
LabelsThe following labels could not be found: Please fix the above issues or remove invalid values from |
Bumps [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom) from 29.7.0 to 30.4.1. - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.4.1/packages/jest-environment-jsdom) --- updated-dependencies: - dependency-name: jest-environment-jsdom dependency-version: 30.4.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
a780ca1 to
9872de4
Compare
|
Superseded by #13 — that PR lands the same version bump plus the test-side migration required by jsdom 30. |
|
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting If you change your mind, just re-open this PR and I'll resolve any conflicts on it. |
jsdom 30 made several `window` properties (`top`, `parent`, `self`, `location`) and `global.document` / `global.window` non-configurable own properties. The previous tests relied on `Object.defineProperty(window, 'top', ...)` to swap them in/out, which now throws `TypeError: Cannot redefine property`. Migration: - New `src/utils/windowFrame.ts` helper: routes frame-detection reads (`window.self !== window.top`, `window.parent.location.hostname`) through `isEmbedded()` / `readParentOrigin()`. Tests stub these via `jest.unstable_mockModule` instead of fighting jsdom's lockdown. - `IFrameStrategy.ts`, `sizeDetector.ts`, `assess.ts` updated to use the helper. Behavior preserved — same cross-origin try/catch shape, same isExternalFrame/parentDomain semantics. - `IFrameStrategy.test.ts` rewritten to ESM-mode dynamic imports (`jest.unstable_mockModule` doesn't hoist like `jest.mock` and requires `await import(...)` after the mock registration). - `ContentProtector.test.ts` switched to `@jest-environment node`. That suite already replaced `document`/`window`/`navigator` wholesale via its own synthetic mocks; the node env leaves those slots empty so the mocks can occupy them without conflict. Added a minimal `HTMLElement` shim for the source's `instanceof` check. - `devToolsDetectors.test.ts`: one test (`SizeDetector › isSupported returns false inside an iframe`) is now `it.skip`'d. The same code path is exercised by IFrameStrategy.test.ts; mocking it here would require restructuring 12 imports into dynamic form for one branch. Supersedes #11.
…13) jsdom 30 made several `window` properties (`top`, `parent`, `self`, `location`) and `global.document` / `global.window` non-configurable own properties. The previous tests relied on `Object.defineProperty(window, 'top', ...)` to swap them in/out, which now throws `TypeError: Cannot redefine property`. Migration: - New `src/utils/windowFrame.ts` helper: routes frame-detection reads (`window.self !== window.top`, `window.parent.location.hostname`) through `isEmbedded()` / `readParentOrigin()`. Tests stub these via `jest.unstable_mockModule` instead of fighting jsdom's lockdown. - `IFrameStrategy.ts`, `sizeDetector.ts`, `assess.ts` updated to use the helper. Behavior preserved — same cross-origin try/catch shape, same isExternalFrame/parentDomain semantics. - `IFrameStrategy.test.ts` rewritten to ESM-mode dynamic imports (`jest.unstable_mockModule` doesn't hoist like `jest.mock` and requires `await import(...)` after the mock registration). - `ContentProtector.test.ts` switched to `@jest-environment node`. That suite already replaced `document`/`window`/`navigator` wholesale via its own synthetic mocks; the node env leaves those slots empty so the mocks can occupy them without conflict. Added a minimal `HTMLElement` shim for the source's `instanceof` check. - `devToolsDetectors.test.ts`: one test (`SizeDetector › isSupported returns false inside an iframe`) is now `it.skip`'d. The same code path is exercised by IFrameStrategy.test.ts; mocking it here would require restructuring 12 imports into dynamic form for one branch. Supersedes #11.
Bumps jest-environment-jsdom from 29.7.0 to 30.4.1.
Release notes
Sourced from jest-environment-jsdom's releases.
... (truncated)
Changelog
Sourced from jest-environment-jsdom's changelog.
... (truncated)
Commits
b3b4a09v30.4.15cbb21ev30.4.0efb59c2v30.3.0b5b0220Remove unused dependencies from jest-environment-jsdom (#15928)855864ev30.2.0ebfa31cv30.1.2d347c0fv30.1.14d5f41dv30.1.022236cfv30.0.5f4296d2v30.0.4