clarkbw / jest-localstorage-mock

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature: work with dom-storage

markfaine opened this issue · comments

commented

Is there any reason why it would not work with dom-storage?

My tests are telling me that the mock function is not being called.

There wouldn't be a global localStorage or sessionStorage with that package so I suspect things wouldn't work out of the box. However with a little hacking you should be able to wire it up. Try something like this: #43 (comment)

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.