Skip to content

Commit

Permalink
Shorten issuer previousProof test.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Sep 24, 2024
1 parent da5d08c commit 9b830c7
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions suites/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,10 @@ export function runDataIntegrityProofFormatTests({
'value or unordered list of string values.', function() {
for(const proof of proofs) {
if(proof.previousProof) {
proof.previousProof.should.be.
oneOf(['string', 'object'], 'Expected ' +
'"proof.previousProof" to be a string or an array.');
if(typeof proof.previousProof === 'object') {
for(const previousProof in proof.previousProof) {
previousProof.should.be.a('string', 'Expected ' +
'"previousProof" items to be a string.');
}
}
isStringOrArrayOfStrings(proof.previousProof).should.equal(
true,
'"proof.previousProof" should be a string or an Array of strings.'
);
}
}
});
Expand Down

0 comments on commit 9b830c7

Please sign in to comment.