Skip to content

Releases: clarkbw/jest-localstorage-mock

jsdom localStorage and sessionStorage support

23 Oct 03:30
Compare
Choose a tag to compare

Thanks to @geoffdutton in #80 we have support for the latest version of jest which pulls in an updated jsdom.

Enumerable properties

16 Jan 17:13
Compare
Choose a tag to compare

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.

Node LTS support

10 Nov 19:37
Compare
Choose a tag to compare

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

26 Sep 17:05
Compare
Choose a tag to compare

This release fixes the issue #35 where values were not being coerced into strings before storage.

SessionStorage

18 Sep 18:30
Compare
Choose a tag to compare

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.