Skip to content

Commit

Permalink
fix: use empty artifact in test (#5640)
Browse files Browse the repository at this point in the history
This PR replaces the benchmark artifact used in the artifact_hash test with an empty artifact.
  • Loading branch information
alexghr authored Apr 9, 2024
1 parent ff28080 commit 1d18a5e
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions yarn-project/circuits.js/src/contract/artifact_hash.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import { getBenchmarkContractArtifact } from '../tests/fixtures.js';
import { type ContractArtifact } from '@aztec/foundation/abi';

import { computeArtifactHash } from './artifact_hash.js';

describe('ArtifactHash', () => {
it('calculates the artifact hash', () => {
const artifact = getBenchmarkContractArtifact();
expect(computeArtifactHash(artifact).toString()).toMatchInlineSnapshot(
`"0x077417e7303df9113d0d0947b9dc8a06903cd8aa963a31891e2f28ce121d753e"`,
const emptyArtifact: ContractArtifact = {
fileMap: [],
functions: [],
name: 'Test',
outputs: {
globals: {},
structs: {},
},
};
expect(computeArtifactHash(emptyArtifact).toString()).toMatchInlineSnapshot(
`"0x0dea64e7fa0688017f77bcb7075485485afb4a5f1f8508483398869439f82fdf"`,
);
});
});

0 comments on commit 1d18a5e

Please sign in to comment.