Merge pull request #358 from imrehg/limit

Fix: tests weren't actually testing limit 0 cases
This commit is contained in:
Haad 2018-04-14 08:06:49 +02:00 committed by GitHub
commit 14802f2639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ Object.keys(testAPIs).forEach(API => {
describe('Options: limit', function() {
it('returns 1 item when limit is 0', () => {
const iter = db.iterator({ limit: 1 })
const iter = db.iterator({ limit: 0 })
const first = iter.next().value
const second = iter.next().value
assert.equal(first.hash, last(items))

View File

@ -214,7 +214,7 @@ Object.keys(testAPIs).forEach(API => {
describe('Options: limit', function() {
it('returns 1 item when limit is 0', () => {
const iter = db.iterator({ limit: 1 })
const iter = db.iterator({ limit: 0 })
const first = iter.next().value
const second = iter.next().value
assert.equal(first.hash, last(items))