Skip to content

Commit

Permalink
fixed bip32.test.ts flakiness test as signature length can be lesser (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored May 17, 2021
1 parent 459629d commit 7f906b1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ describe('24 words: random', () => {
const hash = Buffer.from('e9071e75e25b8a1e298a72f0d2e9f4f95a0f5cdf86a533cda597eb402ed13b3a', 'hex')

const signature = await node.sign(hash)
expect(signature.length).toBe(70)
expect(signature.length).toBeLessThanOrEqual(70)
expect(signature.length).toBeGreaterThanOrEqual(67) // 0.00001 probability of being this length

const valid = await node.verify(hash, signature)
expect(valid).toBe(true)
Expand Down

0 comments on commit 7f906b1

Please sign in to comment.