From 4f65ffd40e2de757119d4dbf056b707a64a6be42 Mon Sep 17 00:00:00 2001 From: dev0x1 Date: Tue, 10 Oct 2023 20:26:05 +0530 Subject: [PATCH] add another poseidon test(just to trigger ci) --- packages/contracts/test/hasher/PoseidonHasher.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/contracts/test/hasher/PoseidonHasher.test.ts b/packages/contracts/test/hasher/PoseidonHasher.test.ts index 77b6a228..6438010f 100644 --- a/packages/contracts/test/hasher/PoseidonHasher.test.ts +++ b/packages/contracts/test/hasher/PoseidonHasher.test.ts @@ -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++) {