diff --git a/package.json b/package.json index 4b7b6100..39d6ecd5 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "prebuildify-cross": "^4.0.1", "readfiletree": "^1.0.0", "rimraf": "^3.0.0", - "standard": "^16.0.3", + "standard": "^17.0.0-2", "tape": "^5.0.1", "tempy": "^1.0.1" }, diff --git a/test/common.js b/test/common.js index 4098b136..85c84f73 100644 --- a/test/common.js +++ b/test/common.js @@ -4,7 +4,7 @@ const leveldown = require('..') const suite = require('abstract-leveldown/test') module.exports = suite.common({ - test: test, + test, factory: function () { return leveldown(tempy.directory()) }, diff --git a/test/compression-test.js b/test/compression-test.js index e233f0d8..fb771d55 100644 --- a/test/compression-test.js +++ b/test/compression-test.js @@ -30,7 +30,7 @@ const cycle = function (db, compression, t, callback) { db.close(function (err) { t.error(err) db = leveldown(location) - db.open({ errorIfExists: false, compression: compression }, function () { + db.open({ errorIfExists: false, compression }, function () { t.error(err) db.close(function (err) { t.error(err) diff --git a/test/leak-tester-batch.js b/test/leak-tester-batch.js index 9e43e406..37f0e74b 100644 --- a/test/leak-tester-batch.js +++ b/test/leak-tester-batch.js @@ -25,24 +25,24 @@ function print () { const run = CHAINED ? function () { - const batch = db.batch() + const batch = db.batch() - for (let i = 0; i < 100; i++) { - let key = 'long key to test memory usage ' + String(Math.floor(Math.random() * 10000000)) - if (BUFFERS) key = Buffer.from(key) - let value = crypto.randomBytes(1024) - if (!BUFFERS) value = value.toString('hex') - batch.put(key, value) - } + for (let i = 0; i < 100; i++) { + let key = 'long key to test memory usage ' + String(Math.floor(Math.random() * 10000000)) + if (BUFFERS) key = Buffer.from(key) + let value = crypto.randomBytes(1024) + if (!BUFFERS) value = value.toString('hex') + batch.put(key, value) + } - batch.write(function (err) { - assert(!err) - process.nextTick(run) - }) + batch.write(function (err) { + assert(!err) + process.nextTick(run) + }) - writeCount++ - print() - } + writeCount++ + print() + } : function () { const batch = [] @@ -51,7 +51,7 @@ const run = CHAINED if (BUFFERS) key = Buffer.from(key) let value = crypto.randomBytes(1024) if (!BUFFERS) value = value.toString('hex') - batch.push({ type: 'put', key: key, value: value }) + batch.push({ type: 'put', key, value }) } db.batch(batch, function (err) {