Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Abstract tests single function (#495)
Browse files Browse the repository at this point in the history
* Target abstract-leveldown#ffba12f

* Use single test function from abstract-leveldown

* Target abstract-leveldown#d7411bb

* Options is actually now passed as options from abstract-leveldown and not a function
  • Loading branch information
ralphtheninja authored Jul 13, 2018
1 parent 85ad5de commit 86d97f5
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 66 deletions.
2 changes: 1 addition & 1 deletion chained-batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ChainedBatch.prototype._clear = function (key) {
}

ChainedBatch.prototype._write = function (options, callback) {
this.binding.write(options, callback)
this.binding.write(callback)
}

util.inherits(ChainedBatch, AbstractChainedBatch)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"main": "leveldown.js",
"dependencies": {
"abstract-leveldown": "level/abstract-leveldown#master",
"abstract-leveldown": "level/abstract-leveldown#d7411bb",
"bindings": "~1.3.0",
"fast-future": "~1.0.2",
"nan": "~2.10.0",
Expand Down
1 change: 1 addition & 0 deletions test/abstract-leveldown-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('abstract-leveldown/test')(require('./common'))
5 changes: 0 additions & 5 deletions test/batch-test.js

This file was deleted.

5 changes: 0 additions & 5 deletions test/chained-batch-test.js

This file was deleted.

9 changes: 0 additions & 9 deletions test/close-test.js

This file was deleted.

13 changes: 7 additions & 6 deletions test/common.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const testCommon = require('abstract-leveldown/test/common')
const test = require('tape')
const tempy = require('tempy')
const leveldown = require('..')

testCommon.factory = function () {
return leveldown(tempy.directory())
}

module.exports = testCommon
module.exports = require('abstract-leveldown/test/common')({
test: test,
factory: function () {
return leveldown(tempy.directory())
}
})
5 changes: 0 additions & 5 deletions test/del-test.js

This file was deleted.

5 changes: 0 additions & 5 deletions test/get-test.js

This file was deleted.

5 changes: 0 additions & 5 deletions test/iterator-range-test.js

This file was deleted.

5 changes: 0 additions & 5 deletions test/iterator-test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
const test = require('tape')
const testCommon = require('./common')
const abstract = require('abstract-leveldown/test/iterator-test')
const make = require('./make')
const iota = require('iota-array')
const lexi = require('lexicographic-integer')
const util = require('util')

abstract.all(testCommon.factory, test)

make('iterator throws if key is not a string or buffer', function (db, t, done) {
var keys = [null, undefined, 1, true, false]
var pending = keys.length
Expand Down
4 changes: 0 additions & 4 deletions test/leveldown-test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const test = require('tape')
const testCommon = require('./common')
const abstract = require('abstract-leveldown/test/leveldown-test')
const leveldown = require('..')

abstract.args(testCommon.factory, test)

test('test database creation non-string location throws', function (t) {
t.throws(
leveldown.bind(null, {}),
Expand Down
5 changes: 0 additions & 5 deletions test/open-test.js

This file was deleted.

5 changes: 0 additions & 5 deletions test/put-get-del-test.js

This file was deleted.

5 changes: 0 additions & 5 deletions test/put-test.js

This file was deleted.

0 comments on commit 86d97f5

Please sign in to comment.