Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract tests single function #495

Merged
merged 4 commits into from
Jul 13, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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#ffba12f",
"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')({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this comes in handy

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.