Skip to content

Commit

Permalink
Option to disable iterator tests
Browse files Browse the repository at this point in the history
  • Loading branch information
piranna committed Aug 16, 2019
1 parent 9d107d0 commit 9f9ae2f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function testCommon (options) {
bufferKeys: options.bufferKeys !== false,
createIfMissing: options.createIfMissing !== false,
errorIfExists: options.errorIfExists !== false,
iterator: options.iterator !== false,
snapshots: options.snapshots !== false,
seek: options.seek !== false
}
Expand Down
24 changes: 13 additions & 11 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,19 @@ function suite (options) {
require('./batch-test').all(test, testCommon)
require('./chained-batch-test').all(test, testCommon)

require('./iterator-test').all(test, testCommon)
require('./iterator-range-test').all(test, testCommon)

if (testCommon.seek) {
require('./iterator-seek-test').all(test, testCommon)
}

if (testCommon.snapshots) {
require('./iterator-snapshot-test').all(test, testCommon)
} else {
require('./iterator-no-snapshot-test').all(test, testCommon)
if (testCommon.iterator) {
require('./iterator-test').all(test, testCommon)
require('./iterator-range-test').all(test, testCommon)

if (testCommon.seek) {
require('./iterator-seek-test').all(test, testCommon)
}

if (testCommon.snapshots) {
require('./iterator-snapshot-test').all(test, testCommon)
} else {
require('./iterator-no-snapshot-test').all(test, testCommon)
}
}
}

Expand Down

0 comments on commit 9f9ae2f

Please sign in to comment.