Open exabugs opened 7 years ago
What JS environment are you using? In nodeJS there is no window
object.
Yes, I use this on Nodejs6.9 + Mocha at UnitTest environment. Production environment is on the modern browser, Babel + Webpack compiled JS.
Test with browser is too difficult, so I'd like to test it on simple environment.
This library is wrapper HTML5 WebStorage and only use on Browser, isn't it ?
Yes, it uses window local storage for storing data. That wouldn't be available in node.
So what can be used instead of window? Can we make it work with node?
You could use a package that substitutes that in node such as node-localstorage. However, we have only tested this library in a browser environment.
On plain JS (not Browser) environment (ex. unit test), CognitoSyncManager don't work properly.
code is below.