Skip to content

Commit

Permalink
add another poseidon test(just to trigger ci)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev0x1 committed Oct 10, 2023
1 parent d78006e commit 4f65ffd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/contracts/test/hasher/PoseidonHasher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ contract('Poseidon hasher', (accounts) => {
});

describe('#sponge-hash', () => {
it('should hash a random value', async () => {
const input = randomBN();
let contractResult = await hasherInstance.contract.hash1(input);
let result = poseidon([input]);
assert.strictEqual(result.toString(), contractResult.toString());
});
it('should hash random values of 6-elements array', async () => {
const inputs: any = [];
for (let i = 0; i < 6; i++) {
Expand Down

0 comments on commit 4f65ffd

Please sign in to comment.