Skip to content

Commit

Permalink
fix: use empty artifact in test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Apr 9, 2024
1 parent ff28080 commit 07df45a
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 07df45a

Please sign in to comment.