From ddf55269d75187a34d7dd00e67f4c6b75ca7c0af Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Sun, 31 Mar 2024 10:17:04 +0000 Subject: [PATCH] pedersen snapshot --- .../pedersen/__snapshots__/index.test.ts.snap | 2 +- .../foundation/src/crypto/pedersen/index.test.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn-project/foundation/src/crypto/pedersen/__snapshots__/index.test.ts.snap b/yarn-project/foundation/src/crypto/pedersen/__snapshots__/index.test.ts.snap index b8842b33c779..b458599906b4 100644 --- a/yarn-project/foundation/src/crypto/pedersen/__snapshots__/index.test.ts.snap +++ b/yarn-project/foundation/src/crypto/pedersen/__snapshots__/index.test.ts.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`pedersen pedersen hash buffer 1`] = `Buffer<0x2bd5c452a0c97162294fc9dfd0f1e09d0e09c95fa5ed3ff149fbdef366cb51f9>`; +exports[`pedersen pedersen hash buffer 1`] = `"2bd5c452a0c97162294fc9dfd0f1e09d0e09c95fa5ed3ff149fbdef366cb51f9"`; diff --git a/yarn-project/foundation/src/crypto/pedersen/index.test.ts b/yarn-project/foundation/src/crypto/pedersen/index.test.ts index 365e585d0091..3245a260b3de 100644 --- a/yarn-project/foundation/src/crypto/pedersen/index.test.ts +++ b/yarn-project/foundation/src/crypto/pedersen/index.test.ts @@ -36,11 +36,11 @@ describe('pedersen', () => { expect(r.toString()).toEqual('0x1c446df60816b897cda124524e6b03f36df0cec333fad87617aab70d7861daa6'); }); - // it('pedersen hash buffer', () => { - // const input = Buffer.alloc(123); - // input.writeUint32BE(321, 0); - // input.writeUint32BE(456, 119); - // const r = pedersenHashBuffer(input); - // expect(r).toMatchSnapshot(); - // }); + it('pedersen hash buffer', () => { + const input = Buffer.alloc(123); + input.writeUint32BE(321, 0); + input.writeUint32BE(456, 119); + const r = pedersenHashBuffer(input); + expect(r.toString('hex')).toMatchSnapshot(); + }); });