jest-location-mock
jest-location-mock copied to clipboard
πΊπ§ͺ Jest hooks for JSDOM location mock
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 32.0.1 to 40.1.0. Release notes Sourced from eslint-plugin-unicorn's releases. v40.1.0 expiring-todo-comments: Add date option (#1683) 16bc33a consistent-function-scoping: Allow React.useHook (#1691) e910633 no-useless-undefined: Allow React.createContext(undefined) (#1688) 40bc603 https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v40.0.0...v40.1.0...
## Breaking - Breaking: Add setter method on window.location - Breaking: Add spies and proxy for window.history to track its updates to the original window.location (fixes #158, fixes #123) ##...
Jest has an `injectGlobals: false` option that forces you to import the global functions from `@jest/globals`, this PR makes it compatible from that option by always importing it from there,...
Credit to ChatGPT for this, a workaround for newer jsdom where they make everything immutable, maybe this can get incorporated into your module ``` function mockLocation(windowObj) { const propertyDescriptors =...
We're looking to migrate to Vitest, it would be awesome to have guidance on how to use this package in Vitest rather than Jest