mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-06-06 06:06:38 +00:00
Merge pull request #358 from imrehg/limit
Fix: tests weren't actually testing limit 0 cases
This commit is contained in:
commit
14802f2639
@ -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))
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user