From: Chris Duncan Date: Mon, 15 Sep 2025 15:41:02 +0000 (-0700) Subject: Fix test destroying Ledger connection before signature rejection can be checked. X-Git-Tag: v0.10.5~14^2~19 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=cba33ba23b0e1faa1744636098a074ac49c66b6c;p=libnemo.git Fix test destroying Ledger connection before signature rejection can be checked. --- diff --git a/test/test.ledger.mjs b/test/test.ledger.mjs index a2177a1..81488d8 100644 --- a/test/test.ledger.mjs +++ b/test/test.ledger.mjs @@ -204,14 +204,8 @@ await Promise.all([ assert.ok(/^[A-F0-9]{128}$/i.test(sendBlock.signature ?? '')) }) - await test('destroy wallet', async () => { - await wallet.destroy() - await assert.rejects(wallet.unlock()) - }) - await test('fail when using new', async () => { - //@ts-expect-error - assert.throws(() => new Ledger()) + assert.throws(() => new Wallet('Ledger')) }) await test('fail to sign a block without caching frontier', async () => { @@ -219,6 +213,11 @@ await Promise.all([ .send(account.address, '0') await assert.rejects(sendBlock.sign(wallet, 0)) }) + + await test('destroy wallet', async () => { + await wallet.destroy() + await assert.rejects(wallet.unlock()) + }) }) /* node:coverage enable */ ])