From cba33ba23b0e1faa1744636098a074ac49c66b6c Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Mon, 15 Sep 2025 08:41:02 -0700 Subject: [PATCH] Fix test destroying Ledger connection before signature rejection can be checked. --- test/test.ledger.mjs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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 */ ]) -- 2.47.3