-
-
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
API to simulate QuotaExceededError #51
Comments
With extension, a way to test all error when opening database, open transaction, etc ... will be useful too. |
Something like : indexedDB.__simulate = QUOTA_EXCEEDED_ERROR
// unit test ...
indexedDB.__simulate = CLOSE_EVENT
// unit test ... Not API breaker and help unit testing. |
Is the idea with Seems to me like it would be more useful to set the quota amount for testing ( |
@Quelklef This would require fakeindexeddb to actually calculate how much "storage" it's using, which would be computationally expensive and inaccurate since it's all in-memory. The problem with |
@nolanlawson Okay, that all makes sense. What is the intended behaviour of |
That's what I was thinking – that way, you could test throwing both on |
Got it. IMO, it reads a little like setting a config option rather than setting up for imminent behaviour. Compare it to something like |
Similar to #50, it would be awesome for fakeindexeddb to have a way to simulate the storage device running out of space and throwing a QuotaExceededError.
Currently this is really hard to repro, even in a browser (it's recommended to create a separate volume and start Chrome with that volume). Having it in fakeindexeddb would be extremely convenient.
Something like:
The text was updated successfully, but these errors were encountered: