Level / level-js

An abstract-leveldown compliant store on top of IndexedDB.
MIT License
544 stars 44 forks source link

Test and document native order #157

Closed vweevers closed 5 years ago

vweevers commented 5 years ago

Closes #156. Reverts the temporary workaround introduced in #155.

Tested locally in Chrome, FF, Opera, IE and Edge.

Stumbled upon a curious bug in IE and Edge: if the database contains any key types other than string, then { gte: '' } yields 0 results. I've disabled the relevant test by commenting it out.

vweevers commented 5 years ago

Tests failed on what seems like an unrelated race issue (or conflict between tests, idk):

Click to expand ``` # add key after snapshotting that sorts first ok 624 no open error ok 625 no put error ok 626 no put error ok 627 no next error ok 628 got a key not ok 629 correct key --- operator: equal expected: 'z' actual: 'a' stack: |- Error: correct key at assert (http://airtap.local:37774/airtap/test-bundle.js:9389:9) at bound (http://airtap.local:37774/airtap/test-bundle.js:9241:21) at equal (http://airtap.local:37774/airtap/test-bundle.js:9549:5) at bound (http://airtap.local:37774/airtap/test-bundle.js:9241:21) at Anonymous function (http://airtap.local:37774/airtap/test-bundle.js:2255:9) at Anonymous function (http://airtap.local:37774/airtap/test-bundle.js:146:5) at Anonymous function (http://airtap.local:37774/airtap/test-bundle.js:27:788) at Item.prototype.run (http://airtap.local:37774/airtap/test-bundle.js:4476:5) at nextTick (http://airtap.local:37774/airtap/test-bundle.js:4447:7) ... # add key after snapshotting that sorts first Error: correct key not ok 630 correct value --- operator: equal expected: 'from snapshot' actual: 'not from snapshot' stack: |- Error: correct value at assert (http://airtap.local:37774/airtap/test-bundle.js:9389:9) at bound (http://airtap.local:37774/airtap/test-bundle.js:9241:21) at equal (http://airtap.local:37774/airtap/test-bundle.js:9549:5) at bound (http://airtap.local:37774/airtap/test-bundle.js:9241:21) at Anonymous function (http://airtap.local:37774/airtap/test-bundle.js:2256:9) at Anonymous function (http://airtap.local:37774/airtap/test-bundle.js:146:5) at Anonymous function (http://airtap.local:37774/airtap/test-bundle.js:27:788) at Item.prototype.run (http://airtap.local:37774/airtap/test-bundle.js:4476:5) at nextTick (http://airtap.local:37774/airtap/test-bundle.js:4447:7) ... # add key after snapshotting that sorts first Error: correct value ok 631 no run error ok 632 no iterator end error ```
vweevers commented 5 years ago

Restarted the build.