From c71f482facdaac914c45f4bf91f48e05a930abff Mon Sep 17 00:00:00 2001 From: Dhruv Kelawala Date: Wed, 15 Jun 2022 23:43:15 +0530 Subject: [PATCH] fix(tests): update test --- __tests__/utils/utils.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/__tests__/utils/utils.test.ts b/__tests__/utils/utils.test.ts index 2d87385ed..e1e275f2a 100644 --- a/__tests__/utils/utils.test.ts +++ b/__tests__/utils/utils.test.ts @@ -89,10 +89,10 @@ describe('estimatedFeeToMaxFee()', () => { }); }); -describe('Deterministic Address calculation', () => { +describe('calculateContractAddressFromHash()', () => { // This test just show how to use calculateContractAddressFromHash for new devs - test.only('calculate hash', () => { + test('calculated contract address should match the snapshot', () => { const ethAddress = '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7'; const daiAddress = '0x03e85bfbb8e2a42b7bead9e88e9a1b19dbccf661471061807292120462396ec9'; @@ -109,6 +109,8 @@ describe('Deterministic Address calculation', () => { factoryAddress ); - expect(res).not.toBeNull(); + expect(res).toMatchInlineSnapshot( + `"0x36dc8dcb3440596472ddde11facacc45d0cd250df764ae7c3d1a360c853c324"` + ); }); });