-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
FakeDOMStringList should not support array methods #66
Comments
This is a good point. I think FakeDOMStringList does need to subclass/extend the built-in Array, because otherwise I don't know how you'd get various proper behaviors like destructuring. Please correct me if I'm wrong. But it should either delete the Array-specific methods from the class or if that's not possible manually override them to throw errors. I think that should be possible, at least. I was planning on doing a new release soon, I will try to include this. |
That sounds good, thanks for looking into it |
Turns out the solution I came up with in 7879a24 causes some problems when used with Dexie. I'm not sure why. But I guess it'll be safer to not do this, unless someone can help me figure out a better way. |
|
FakeDOMStringList seems to be extending array, but a number of array methods aren't available. Such that tests can pass and then result in failure in production.
I had a migration that executed
transaction.objectStoreNames.includes('...')
and didn't cause any issues, but then failed in production as should have beentransaction.objectStoreNames.contains('...')
. Didn't pick up on it with types due to a bug in idbThe text was updated successfully, but these errors were encountered: