-
-
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
Order results correctly when using getAll() and getAllKeys() #326
base: main
Are you sure you want to change the base?
Conversation
This will hopefully resolve the ordering issue listed in dexie/Dexie.js#709 dexie/Dexie.js#701
Seems the travis tests failed. Was not able to test locally either. What I did for testing was building the shim and run the dexie tests on it. Still, there are failing tests, but many went from failed to OK. Am I supposed to commit the files in dist together with the source? Would appreciate any help in contributing to IndexedDBShim. |
This is great, thanks! Can you point me to the particular Dexie tests failing for this case if it is something that could, without too much trouble, map to a vanilla IDB test? |
And I believe the Travis tests may always fail on the forks... |
@brettz9 I think both Dexie and IndexedDBShim would benefit from integrating the dexie test suite with IndexedDBShim applied - both in browser and on node. This is what @aral is up to. I plan to make a test config in dexie that runs all tests with the shim applied shim applied (one config for using the shim in browser and one for using it on node). Since there seems to be several tests that fails with the shim, I believe it's not worth the effort to rewrite them to use vanilla indexeddb testing. This could also become a more sustainable road forward, if it will be easy to the the shim in dexie tests and get regression tests in all future versions. I think me and @aral is on this right now, and we'll try finding and fixing issues in best-effort. Let's see what comes out from that, as a first step. I'll let you know if we need more help. |
This fix made 2 other assertions in dexie unit tests turn from fail to ok.
After the last commit, another 2 assertions make it through in the dexie tests. The last commit was that IDBIndex.getAll() should not just ORDER BY the queried key, but also on primary key. |
With your PR I'm now getting failures on 'idbindex_getAll' and 'idbindex_getAllKeys', two W3C web-platform-tests tests that we were not getting failures on previously. Btw, I just updated The tests you want to run are |
@brettz9 thanks for guiding in how to run the tests. I'm trying to setup the test environment to debug it. |
I've got no luck running the w3c tests. Installed the WPT according to their instructions. Then, the instructions in docs/TESTING did not guide me in how to proceed from there exactly, but as I had installed web-platform-tests in its own location, i symlinked IndexedDBShim/web-platform-tests into that location. Then, I tried both
|
Sorry, I can't figure out why I sometimes don't seem to get notifications from Github issues... The relevant section of the testing page is no. 4 of https://github.com/axemclion/IndexedDBShim/blob/master/docs/TESTING.md#node-testing After web-platform-tests are running ( The wrap tests are so you can test IndexedDBShim in the browser using their tests. |
The page at https://github.com/axemclion/IndexedDBShim/blob/master/docs/TESTING.md now has additional info on the now headless testing one can do through the web-platform-tests library (their new recommended way of doing browser testing): However, if you'd rather avoid setting up the testing environment, you could just extract the JavaScript within the relevant tests at https://github.com/web-platform-tests/wpt/blob/master/IndexedDB/idbindex_getAll.html and https://github.com/web-platform-tests/wpt/blob/master/IndexedDB/idbindex_getAllKeys.html |
Though I forgot those had some dependencies you'd have to grab too... |
In |
This will hopefully resolve the ordering issue listed in
dexie/Dexie.js#709
dexie/Dexie.js#701
as referred from #325.