From 17a71927b2fc92e28ad07be6170314761b4995b0 Mon Sep 17 00:00:00 2001 From: vbasiuk Date: Fri, 27 Sep 2024 13:09:46 +0300 Subject: [PATCH] fix unit --- tests/handlers/auth.test.ts | 8 ++++---- tests/proofs/sig.test.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/handlers/auth.test.ts b/tests/handlers/auth.test.ts index 64418d46..2888d5b3 100644 --- a/tests/handlers/auth.test.ts +++ b/tests/handlers/auth.test.ts @@ -835,7 +835,7 @@ describe('auth', () => { const proofRequest: ZeroKnowledgeProofRequest = { id: 23, - circuitId: 'credentialAtomicQueryMTPV2', + circuitId: CircuitId.AtomicQueryMTPV2, query: { allowedIssuers: ['*'], context: @@ -997,7 +997,7 @@ describe('auth', () => { const proofRequest: ZeroKnowledgeProofRequest = { id: 84239, - circuitId: 'credentialAtomicQuerySigV2', + circuitId: CircuitId.AtomicQuerySigV2, query: { allowedIssuers: ['*'], context: @@ -1318,7 +1318,7 @@ describe('auth', () => { context: 'https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld', credentialSubject: { documentType: { $eq: 99 } }, - proofType: 'Iden3SparseMerkleTreeProof', + proofType: ProofType.Iden3SparseMerkleTreeProof, type: 'KYCAgeCredential' } } @@ -1779,7 +1779,7 @@ describe('auth', () => { const proofRequest: ZeroKnowledgeProofRequest = { id: 1, - circuitId: 'credentialAtomicQuerySigV2', + circuitId: CircuitId.AtomicQuerySigV2, query: { allowedIssuers: ['*'], context: diff --git a/tests/proofs/sig.test.ts b/tests/proofs/sig.test.ts index 44bf92fc..5c25f5d8 100644 --- a/tests/proofs/sig.test.ts +++ b/tests/proofs/sig.test.ts @@ -309,7 +309,7 @@ describe('sig proofs', () => { scope: [ { id: 1, - circuitId: 'credentialAtomicQuerySigV2', + circuitId: CircuitId.AtomicQuerySigV2, query: { allowedIssuers: ['*'], context: 'ipfs://QmZ1zsLspwnjifxsncqDkB7EHb2pnaRnBPc5kqQcVxW5rV', @@ -477,7 +477,7 @@ describe('sig proofs', () => { expect(credsForMyUserDID.length).to.equal(1); const vpReq = { id: 1, - circuitId: 'credentialAtomicQuerySigV2', + circuitId: CircuitId.AtomicQuerySigV2, query }; const { proof, vp } = await proofService.generateProof(vpReq, userDID); @@ -500,7 +500,7 @@ describe('sig proofs', () => { }); const deliveryVPReq = { id: 1, - circuitId: 'credentialAtomicQuerySigV2', + circuitId: CircuitId.AtomicQuerySigV2, query: { ...deliveryCredQuery, credentialSubject: { 'postalProviderInformation.insured': {} } @@ -540,7 +540,7 @@ describe('sig proofs', () => { reason: 'test flow', scope: [ { - circuitId: 'credentialAtomicQueryV3-beta.1', + circuitId: CircuitId.AtomicQueryV3, id: 1711115116, query: { allowedIssuers: ['*'], @@ -612,7 +612,7 @@ describe('sig proofs', () => { reason: 'test flow', scope: [ { - circuitId: 'credentialAtomicQueryV3-beta.1', + circuitId: CircuitId.AtomicQueryV3, id: 1711115116, query: { allowedIssuers: ['*'],