mirror of https://codeberg.org/pzp/pzp-promise.git
update test scripts
This commit is contained in:
parent
207f6a4692
commit
05d0523d1d
|
@ -43,8 +43,10 @@
|
|||
"typescript": "^5.0.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"test": "node --test",
|
||||
"clean-check": "tsc --build --clean",
|
||||
"prepublishOnly": "npm run clean-check && tsc --build",
|
||||
"postpublish": "npm run clean-check",
|
||||
"test": "npm run clean-check && node --test",
|
||||
"format-code": "prettier --write \"*.js\" \"(test|lib)/*.js\"",
|
||||
"format-code-staged": "pretty-quick --staged --pattern \"*.js\" --pattern \"(test|lib)/*.js\"",
|
||||
"coverage": "c8 --reporter=lcov npm run test"
|
||||
|
|
|
@ -83,7 +83,7 @@ test('accountAdd()', async (t) => {
|
|||
const contentsBefore = fs.readFileSync(file, 'utf-8')
|
||||
assert.strictEqual(contentsBefore, JSON.stringify([[token, promise]]))
|
||||
|
||||
const dbBefore = [...local.db.msgs()].map(({data}) => data)
|
||||
const dbBefore = [...local.db.msgs()].map(({ data }) => data)
|
||||
assert.equal(dbBefore.length, 1)
|
||||
assert.equal(dbBefore[0].action, 'add')
|
||||
assert.equal(dbBefore[0].add.key.algorithm, 'ed25519')
|
||||
|
@ -103,7 +103,7 @@ test('accountAdd()', async (t) => {
|
|||
})
|
||||
assert.strictEqual(result1, true)
|
||||
|
||||
const dbAfter = [...local.db.msgs()].map(({data}) => data)
|
||||
const dbAfter = [...local.db.msgs()].map(({ data }) => data)
|
||||
assert.equal(dbAfter.length, 2)
|
||||
assert.equal(dbAfter[0].action, 'add')
|
||||
assert.equal(dbAfter[0].add.key.algorithm, 'ed25519')
|
||||
|
|
Loading…
Reference in New Issue