Jest Localstorage Mock Versions Save

A module to mock window.localStorage and window.sessionStorage in Jest

v2.3.0

5 years ago

Thanks to @geoffdutton in https://github.com/clarkbw/jest-localstorage-mock/pull/80 we have support for the latest version of jest which pulls in an updated jsdom.

v2.2.0

6 years ago

Thanks to the work by @mcshiz in PR #60 🎉 the localStorage and sessionStorage objects are now enumerable. This means if your code includes functions like Object.keys(localStorage) you'll now retrieve the expected storage items instead of the private mocked functions.

v2.1.0

6 years ago

This release updates the build to target the current active Node LTS release.

If you need to support older node releases like 4.x and are using babel use the import syntax which should pull in the module source code instead of the built code and can compile as needed.

v2.0.1

6 years ago

This release fixes the issue https://github.com/clarkbw/jest-localstorage-mock/issues/35 where values were not being coerced into strings before storage.

v2.0.0

6 years ago

This new release includes support for a sessionStorage global which is a duplicate of all the existing localStorage methods.

While this isn't a breaking change, it is a large change to the library so I wanted a bump from the original version to notify consumers. Please file an issue if you do see a change that isn't backwards compatible with the previous 1.x release.