From 9b830c7ddfd1d7e473c4991bf5585d10e2fe97e4 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 24 Sep 2024 19:35:15 -0400 Subject: [PATCH] Shorten issuer previousProof test. --- suites/create.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/suites/create.js b/suites/create.js index 46c865d..eff83b4 100644 --- a/suites/create.js +++ b/suites/create.js @@ -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.' + ); } } });