Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Commit

Permalink
fix test to increase coverage (nested it wasn't being run)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanio committed Aug 4, 2020
1 parent 3911558 commit 5a48293
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/address.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@ describe('Address', () => {
})

it('should generate address for CREATE2', () => {
for (let i = 0; i <= 6; i++) {
let e = eip1014Testdata[i]
it(`${e['comment']}: should generate the addresses provided`, function() {
const from = Address.fromString(e['address'])
const addr = Address.generate2(from, toBuffer(e['salt']), toBuffer(e['initCode']))
assert.equal(addr.toString(), e['result'])
})
for (const testdata of eip1014Testdata) {
const { address, salt, initCode, result } = testdata
const from = Address.fromString(address)
const addr = Address.generate2(from, toBuffer(salt), toBuffer(initCode))
assert.equal(addr.toString(), result)
}
})
})

0 comments on commit 5a48293

Please sign in to comment.