diff --git a/package.json b/package.json index f5311ad..9a9fd4e 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ "devDependencies": { "airtap": "0.0.7", "buffer": "~5.1.0", - "encoding-down": "~5.0.2", "levelup": "~3.0.0", "pinkie": "~2.0.4", "standard": "^11.0.1", diff --git a/test/index.js b/test/index.js index 666f6b3..9aadf2b 100644 --- a/test/index.js +++ b/test/index.js @@ -32,4 +32,3 @@ require('abstract-leveldown/abstract/iterator-range-test').all(leveljs, test, te require('./custom-test')(leveljs, test, testCommon) require('./structured-clone-test')(leveljs, test, testCommon) require('./key-type-test')(leveljs, test, testCommon) -require('./levelup-test')(leveljs, test, testCommon) diff --git a/test/levelup-test.js b/test/levelup-test.js deleted file mode 100644 index 9983fc1..0000000 --- a/test/levelup-test.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict' - -// NOTE: Temporary integration tests, can be removed later. Remember -// to also remove the encoding-down devDependency. - -var levelup = require('levelup') -var encoding = require('encoding-down') - -module.exports = function (leveljs, test, testCommon) { - test('setup', testCommon.setUp) - - test('levelup put', function (t) { - t.plan(4) - - var down = leveljs(testCommon.location()) - var db = levelup(down) - - db.put('name', 'LevelUP string', function (err) { - t.ifError(err, 'no put error') - - db.get('name', { asBuffer: false }, function (err, value) { - t.ifError(err, 'no get error') - t.is(value, 'LevelUP string') - - db.close(function (err) { - t.ifError(err, 'no close error') - }) - }) - }) - }) - - test('binary', function (t) { - t.plan(9) - - var down = leveljs(testCommon.location()) - var db = levelup(encoding(down, { valueEncoding: 'binary' })) - var buf = Buffer.from('00ff', 'hex') - - db.put('binary', buf, function (err) { - t.ifError(err, 'no put error') - - db.get('binary', function (err, value) { - t.ifError(err, 'no get error') - t.ok(Buffer.isBuffer(value), 'is a buffer') - t.same(value, buf) - - db.get('binary', { valueEncoding: 'id' }, function (err, value) { - t.ifError(err, 'no get error') - t.notOk(Buffer.isBuffer(value), 'is not a buffer') - t.ok(value instanceof Uint8Array, 'is a Uint8Array') - t.same(Buffer.from(value), buf) - - db.close(function (err) { - t.ifError(err, 'no close error') - }) - }) - }) - }) - }) - - test('teardown', testCommon.tearDown) -}