From 74cc846c9af686bc8e7b78e7a8a1c8e9ea39ec35 Mon Sep 17 00:00:00 2001 From: benesjan Date: Fri, 10 May 2024 06:59:32 +0000 Subject: [PATCH] test fix --- .../src/client/private_execution.test.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/yarn-project/simulator/src/client/private_execution.test.ts b/yarn-project/simulator/src/client/private_execution.test.ts index 02e3d6b9588..3f152e2e7bd 100644 --- a/yarn-project/simulator/src/client/private_execution.test.ts +++ b/yarn-project/simulator/src/client/private_execution.test.ts @@ -565,15 +565,6 @@ describe('Private Execution test suite', () => { describe('consuming messages', () => { const contractAddress = defaultContractAddress; - beforeEach(() => { - oracle.getCompleteAddress.mockImplementation((address: AztecAddress) => { - if (address.equals(recipient)) { - return Promise.resolve(recipientCompleteAddress); - } - throw new Error(`Unknown address ${address}`); - }); - }); - describe('L1 to L2', () => { const artifact = getFunctionArtifact(TestContractArtifact, 'consume_mint_private_message'); let bridgedAmount = 100n; @@ -875,15 +866,6 @@ describe('Private Execution test suite', () => { }); describe('pending note hashes contract', () => { - beforeEach(() => { - oracle.getCompleteAddress.mockImplementation((address: AztecAddress) => { - if (address.equals(owner)) { - return Promise.resolve(ownerCompleteAddress); - } - throw new Error(`Unknown address ${address}`); - }); - }); - beforeEach(() => { oracle.getFunctionArtifact.mockImplementation((_, selector) => Promise.resolve(getFunctionArtifact(PendingNoteHashesContractArtifact, selector)), @@ -1065,6 +1047,7 @@ describe('Private Execution test suite', () => { const args = [completeAddress.address]; const pubKey = completeAddress.masterIncomingViewingPublicKey; + oracle.getCompleteAddress.mockResolvedValue(completeAddress); const result = await runSimulator({ artifact, args }); expect(result.returnValues).toEqual([pubKey.x, pubKey.y]); });