Skip to content

Commit

Permalink
Expand test WRT to cbor array in derived proof to include 7 objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Oct 17, 2024
1 parent 9d44aae commit aaf757c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/assertions.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const shouldNotUseCborTags = ({proof}) => {

export const baseProofShouldHaveElementCount = ({
proof,
expectedLengths = [5, 6],
expectedLengths = [5, 6, 7],
reason = 'Expected baseProof to have expected number of components'
}) => {
let error;
Expand Down
15 changes: 7 additions & 8 deletions tests/suites/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,19 +266,18 @@ export function createSuite({
}
});
it('The transformation options MUST contain an array of mandatory ' +
'JSON pointers (mandatoryPointers)', function() {
'JSON pointers (mandatoryPointers).', function() {
this.test.link = 'https://w3c.github.io/vc-di-bbs/#:~:text=The%20transformation%20options%20MUST%20contain%20an%20array%20of%20mandatory%20JSON%20pointers%20(mandatoryPointers)';
for(const proof of bbsProofs) {
shouldHaveMandatoryPointers({proof});
}
});
it('Initialize components to an array that is the result of ' +
'CBOR-decoding the bytes that follow the three-byte BBS disclosure ' +
'proof header. If the result is not an array of five or six elements ' +
'— a byte array, a map of integers to integers, two arrays of ' +
'integers, and one or two byte arrays; an error MUST be raised and ' +
'SHOULD convey an error type of PROOF_VERIFICATION_ERROR.', function() {
this.test.link = 'https://w3c.github.io/vc-di-bbs/#:~:text=%22pseudonym_hidden_pid%22.-,Initialize%20components%20to%20an%20array%20that%20is%20the%20result%20of%20CBOR,be%20raised%20and%20SHOULD%20convey%20an%20error%20type%20of%20PROOF_VERIFICATION_ERROR.,-Replace%20the%20second';
it('If the result is not an array of five, six, or seven elements ' +
'— a byte array, a map of integers to integers, two arrays of ' +
'integers, and one or two byte arrays; an error MUST be raised ' +
'and SHOULD convey an error type of PROOF_VERIFICATION_ERROR.',
function() {
this.test.link = 'https://w3c.github.io/vc-di-bbs/#:~:text=If%20the%20result%20is%20not%20an%20array%20of%20five%2C%20six%2C%20or%20seven%20elements%20%E2%80%94%20a%20byte%20array%2C%20a%20map%20of%20integers%20to%20integers%2C%20two%20arrays%20of%20integers%2C%20and%20one%20or%20two%20byte%20arrays%3B%20an%20error%20MUST%20be%20raised%20and%20SHOULD%20convey%20an%20error%20type%20of%20PROOF_VERIFICATION_ERROR';
for(const proof of bbsProofs) {
baseProofShouldHaveElementCount({proof});
}
Expand Down

0 comments on commit aaf757c

Please sign in to comment.