From d58d6f8dfbccbef250bc4213b56a6fad46691abd Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Mon, 7 Jul 2025 08:32:33 -0700 Subject: [PATCH] Expand Ledger wallet creation test. --- test/test.create-wallet.mjs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/test.create-wallet.mjs b/test/test.create-wallet.mjs index bafffaf..16822af 100644 --- a/test/test.create-wallet.mjs +++ b/test/test.create-wallet.mjs @@ -57,9 +57,19 @@ await suite('Create wallets', async () => { await assert.rejects(Blake2bWallet.create()) }) - await test('connect to ledger', { skip: true }, async () => { + await test('connect to a Ledger device', { skip: false }, async () => { const wallet = await LedgerWallet.create() - assert.ok(wallet) - await wallet.destroy() + let status = await new Promise(resolve => { + const button = document.createElement('button') + button.innerText = 'Unlock Ledger, then click to continue' + button.addEventListener('click', async (event) => { + const connection = await wallet.connect() + document.body.removeChild(button) + resolve(connection) + }) + document.body.appendChild(button) + }) + + assert.equals(status, 'CONNECTED') }) }) -- 2.47.3