Addnew sheets (armor, weapons, malefica) and v13 support
This commit is contained in:
29
node_modules/abstract-level/test/open-error-if-exists-test.js
generated
vendored
Normal file
29
node_modules/abstract-level/test/open-error-if-exists-test.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
'use strict'
|
||||
|
||||
exports.errorIfExists = function (test, testCommon) {
|
||||
test('test database open errorIfExists:true', function (t) {
|
||||
const db = testCommon.factory()
|
||||
|
||||
db.open(function (err) {
|
||||
t.error(err)
|
||||
db.close(function (err) {
|
||||
t.error(err)
|
||||
|
||||
let async = false
|
||||
|
||||
db.open({ createIfMissing: false, errorIfExists: true }, function (err) {
|
||||
t.is(err && err.code, 'LEVEL_DATABASE_NOT_OPEN')
|
||||
t.ok(err && /exists/.test(err.cause && err.cause.message), 'error is about already existing')
|
||||
t.ok(async, 'callback is asynchronous')
|
||||
t.end()
|
||||
})
|
||||
|
||||
async = true
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
exports.all = function (test, testCommon) {
|
||||
exports.errorIfExists(test, testCommon)
|
||||
}
|
||||
Reference in New Issue
Block a user