Closed reintroducing closed 6 years ago
Hi,
If it works perfectly in Mocha but not in Jest, I suggest to look deeper Jest to understand how it works. Problem should be there ;)
Could you provide a jsfiddl or jsbin with Jest + basil to run and test online? Maybe Jest is preventing access to window
or document
on which basil rely to access cookies, storages.. ?
Best
Hello, I don't know if this is the right place for this but I was hoping you could point me in the right direction. I have a thin wrapper around basil called StorageUtils (it just extracts the usage into a module that I prefer basically but uses Basil under the hood). When I test StorageUtils in mocha it works perfectly fine.
I'm now converting my tests to use Jest and it no longer works. Even something as simple as this returns null (not even a real test):
I am at a loss as to why this is happening but was hoping maybe it would trigger something in your mind to help lead me down the right path. Any help would be greatly appreciated.