From 5a482935defa650d989232d3f92e0857081f1d63 Mon Sep 17 00:00:00 2001 From: Ryan Ghods Date: Tue, 4 Aug 2020 10:42:42 -0700 Subject: [PATCH] fix test to increase coverage (nested `it` wasn't being run) --- test/address.spec.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/address.spec.ts b/test/address.spec.ts index 9dc23d68..ede4bbda 100644 --- a/test/address.spec.ts +++ b/test/address.spec.ts @@ -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) } }) })