From: Chris Duncan Date: Thu, 10 Jul 2025 15:30:33 +0000 (-0700) Subject: Update Ledger test. X-Git-Tag: v0.10.5~66 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=398df34f8395b69973ad8321c8a878e004cc857c;p=libnemo.git Update Ledger test. --- diff --git a/test/test.ledger.mjs b/test/test.ledger.mjs index 1cf55de..a18d7a1 100644 --- a/test/test.ledger.mjs +++ b/test/test.ledger.mjs @@ -144,11 +144,11 @@ await suite('Ledger hardware wallet', { skip: false || isNode }, async () => { // nonce signing is currently broken: https://github.com/LedgerHQ/app-nano/pull/14 await test('sign a nonce', { skip: true }, async () => { - // const nonce = new TextEncoder().encode('0123456789abcdef') - // const {status, signature} = await click('Click to sign nonce', wallet.sign(0, nonce)) + const nonce = new TextEncoder().encode('0123456789abcdef') + const { status, signature } = await click('Click to sign nonce', wallet.sign(0, nonce)) - // assert.equals(resultSignNonce.status, 'OK') - // assert.OK(/[A-Fa-f0-9]{128}/.test(resultSignNonce.signature)) + assert.equals(status, 'OK') + assert.OK(/[A-Fa-f0-9]{128}/.test(signature)) }) await test('fail when using new', async () => { @@ -164,9 +164,6 @@ await suite('Ledger hardware wallet', { skip: false || isNode }, async () => { NANO_TEST_VECTORS.SEND_BLOCK.representative, receiveBlock.previous ) - await assert.rejects(click( - 'Fail to sign', - async () => sendBlock.sign(0) - )) + await assert.rejects(sendBlock.sign(0)) }) })