Closed ralphtheninja closed 1 year ago
Relevant code is now here:
Which I agree, should not check specific keys or values, just that it got one. In addition, subsequent tests are dependent on the data written in this test, which is not immediately obvious.
See https://github.com/Level/abstract-leveldown/blob/master/abstract/iterator-test.js#L125-L128 , also rewrite the test a bit, since it doesn't really make sense to do e.g.
Maybe instead use a counter that unless the counter is at the end, then
key
andvalue
should be set, if not, then check forundefined
onerr
,key
andvalue
.Also, remove https://github.com/Level/abstract-leveldown/blob/master/abstract/ranges-test.js#L14-L48 since it's basically the same test and doesn't add any value