Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed May 10, 2024
1 parent 4e67bb1 commit 74cc846
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions yarn-project/simulator/src/client/private_execution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)),
Expand Down Expand Up @@ -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]);
});
Expand Down

0 comments on commit 74cc846

Please sign in to comment.