Skip to content

Commit

Permalink
Remove verifier tests & vectors around testing json pointer properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Oct 11, 2024
1 parent 6ef7949 commit 6d55cf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 51 deletions.
32 changes: 0 additions & 32 deletions tests/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,38 +67,6 @@ export async function verifySetup({credentials, keyTypes, suite}) {
suiteName: suite,
keys
});
// select full arrays
disclosed.array.full = await deriveCredentials({
vectors: transformVectors(subjectHasArrays),
suiteName: suite,
keys
});
const lessThanFullVectors = transformVectors(
subjectHasArrays,
vector => {
// select less than full subarrays
vector.selectivePointers = vector.selectivePointers.slice(2, -4);
return vector;
}
);
disclosed.array.lessThanFull = await deriveCredentials({
vectors: lessThanFullVectors,
suiteName: suite,
keys
});
const removeFirst7Vectors = transformVectors(
subjectHasArrays,
vector => {
// select w/o first 7 array element
vector.selectivePointers = vector.selectivePointers.slice(7);
return vector;
}
);
disclosed.array.missingElements = await deriveCredentials({
vectors: removeFirst7Vectors,
suiteName: suite,
keys
});
const {mandatory, dates} = generators;
const {invalidCreated} = dates;
const {invalidCryptosuite, invalidProofType} = mandatory;
Expand Down
21 changes: 2 additions & 19 deletions tests/suites/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import {supportsVc} from '../helpers.js';
import {
verificationFail,
verificationSuccess
verificationFail
} from '../assertions.js';
import {supportsVc} from '../helpers.js';

/**
* Runs a Mocha Suite on verifier endpoints using the params.
Expand Down Expand Up @@ -50,22 +49,6 @@ export function verifySuite({
const {disclosed} = credentials;
const cloneTestVector = map => structuredClone(
map?.get(keyType)?.get(vcVersion));
it('MUST verify with full array revealed properties',
async function() {
const credential = cloneTestVector(disclosed?.array?.full);
await verificationSuccess({credential, verifier});
});
it('MUST verify with fewer array revealed properties',
async function() {
const credential = cloneTestVector(disclosed?.array?.lessThanFull);
await verificationSuccess({credential, verifier});
});
it('MUST verify w/o first element revealed properties',
async function() {
const credential = cloneTestVector(
disclosed?.array?.missingElements);
await verificationSuccess({credential, verifier});
});
it('If the proofValue string does not start with u (U+0075 LATIN ' +
'SMALL LETTER U), indicating that it is a multibase-base64url' +
'-no-pad-encoded value, an error MUST be raised and SHOULD ' +
Expand Down

0 comments on commit 6d55cf2

Please sign in to comment.