Updates
This commit is contained in:
@@ -10,6 +10,17 @@ test('mycelium-pool: donate borrow', async (t) => {
|
||||
await p.close()
|
||||
})
|
||||
|
||||
test('mycelium-pool: reject negative credits', async (t) => {
|
||||
const p = new HyperP2PMyceliumPool()
|
||||
try {
|
||||
p.donate('peer-a', -1)
|
||||
t.fail('expected error')
|
||||
} catch (err) {
|
||||
t.ok(/non-negative/i.test(err.message))
|
||||
}
|
||||
await p.close()
|
||||
})
|
||||
|
||||
test('mycelium-pool: merge balances', async (t) => {
|
||||
const a = new HyperP2PMyceliumPool()
|
||||
const b = new HyperP2PMyceliumPool()
|
||||
@@ -19,3 +30,8 @@ test('mycelium-pool: merge balances', async (t) => {
|
||||
await a.close()
|
||||
await b.close()
|
||||
})
|
||||
test('hyper-p2p-mycelium-pool: close without leak', async (t) => {
|
||||
const m = new HyperP2PMyceliumPool()
|
||||
await m.close()
|
||||
t.pass()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user