Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all 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 @@ -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",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Marking the PR as a draft because of this

"tape": "^5.0.1",
"tempy": "^1.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())
},
Expand Down
2 changes: 1 addition & 1 deletion test/compression-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
32 changes: 16 additions & 16 deletions test/leak-tester-batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []

Expand All @@ -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) {
Expand Down