Closed vitonsky closed 1 year ago
That is strange, there are already a ton of tests for basic functionality. For example https://github.com/dumbmatter/fakeIndexedDB/blob/c23a612181f267df499d46190875d6974b7589c4/src/test/web-platform-tests/IndexedDB/idbobjectstore_add6.htm
So possibly it is a more subtle bug than it seems? A minimal reproduction would be appreciated.
I have test
https://github.com/translate-tools/linguist/blob/4da90de9e406442ab78df591bad04d7e6b93cdf3/src/requests/backend/translations/data.test.ts#L22-L30
If you replace this code
to this
test will fail, identifiers will not match.
I suppose cause in concurrent inserting data. This behavior are gross mismatch to standard.
Let's fix it, probably we can just use some semafor to insert items one by one and ensure unique id for each entry with considering a insert order.