-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Illegal invocation when trying to start shim within jest #318
Comments
Our previous version (and the one I've just added, 3.6.0) have this file a lot smaller in size than your stack trace would indicate, so I'm wondering whether you are testing against the latest version? |
Some other example:
|
I've reproduced (on accident), no clue what's going on. |
We are attempting to follow the standardized interfaces precisely, and they are picky about how a property is accessed. What is your exact call to As we needed a workaround for our own test environment, I put in a hack that checks for a |
I just got the same issue with jest. What's the workaround? if any. |
Try setting |
How do we set this in Jest? I get the same problem when doing a test on react-native expo app. ` import App from './App'; describe('', () => { |
Hi, I tried to use indeeddbshim with FBs jest, but I got:
TypeError: Illegal invocation
Here's the stacktrace:
at Window.get [as indexedDB] (node_modules/indexeddbshim/dist/indexeddbshim-node.js:11625:33) at shim (node_modules/indexeddbshim/dist/indexeddbshim-node.js:11557:24) at IDBFactory.IDB.shimIndexedDB.__useShim (node_modules/indexeddbshim/dist/indexeddbshim-node.js:11619:21) at setGlobalVars (node_modules/indexeddbshim/dist/indexeddbshim-node.js:11798:35) at Object.<anonymous> (tests/setupTests.js:23:29)
And the testcode:
The text was updated successfully, but these errors were encountered: