Skip to content

Commit

Permalink
add continue if not on last statusEntry
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick <[email protected]>
  • Loading branch information
PatStLouis committed Aug 12, 2024
1 parent 4f5591a commit 6550701
Showing 1 changed file with 55 additions and 21 deletions.
76 changes: 55 additions & 21 deletions tests/10-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,12 @@ describe('Issuers - BitstringStatusList',
'Expected credentialStatus.id to be a string.'
);
} else {
this.test.cell.skipMessage = 'No id property included.';
this.skip();
if(statusEntry === statusEntries[statusEntries.lenght - 1]) {
this.test.cell.skipMessage = 'No id property included.';
this.skip();
} else {
continue;
}
}
}
});
Expand Down Expand Up @@ -178,8 +182,13 @@ describe('Issuers - BitstringStatusList',
statusEntry.statusSize.should.be.gt(0,
'Expected statusSize to be greater than zero.');
} else {
this.test.cell.skipMessage = 'No statusSize property included.';
this.skip();
if(statusEntry === statusEntries[statusEntries.lenght - 1]) {
this.test.cell.skipMessage = 'No statusSize property ' +
'included.';
this.skip();
} else {
continue;
}
}
}
});
Expand All @@ -195,8 +204,13 @@ describe('Issuers - BitstringStatusList',
statusEntry.should.have.own.property(
'statusMessage');
} else {
this.test.cell.skipMessage = 'No statusSize property included.';
this.skip();
if(statusEntry === statusEntries[statusEntries.lenght - 1]) {
this.test.cell.skipMessage = 'No statusSize property ' +
'included.';
this.skip();
} else {
continue;
}
}
}
});
Expand All @@ -211,9 +225,13 @@ describe('Issuers - BitstringStatusList',
an('array').length.should.be.
equal(statusEntry.statusSize);
} else {
this.test.cell.skipMessage = 'No statusMessage property ' +
'included.';
this.skip();
if(statusEntry === statusEntries[statusEntries.lenght - 1]) {
this.test.cell.skipMessage = 'No statusMessage property ' +
'included.';
this.skip();
} else {
continue;
}
}
}
});
Expand All @@ -231,9 +249,13 @@ describe('Issuers - BitstringStatusList',
'Expected statusMessage lenght to be equal to ' +
'statusSize.');
} else {
this.test.cell.skipMessage = 'No statusMessage property ' +
'included.';
this.skip();
if(statusEntry === statusEntries[statusEntries.lenght - 1]) {
this.test.cell.skipMessage = 'No statusMessage property ' +
'included.';
this.skip();
} else {
continue;
}
}
}
});
Expand All @@ -249,9 +271,13 @@ describe('Issuers - BitstringStatusList',
statusEntry.should.have.own.property(
'statusMessage');
} else {
this.test.cell.skipMessage = 'No greater than 1 ' +
'statusSize property included.';
this.skip();
if(statusEntry === statusEntries[statusEntries.lenght - 1]) {
this.test.cell.skipMessage = 'No greater than 1 ' +
'statusSize property included.';
this.skip();
} else {
continue;
}
}
}
});
Expand All @@ -272,9 +298,13 @@ describe('Issuers - BitstringStatusList',
statusMessage.should.each.have.property(
'message').that.is.a('string');
} else {
this.test.cell.skipMessage = 'No statusMessage ' +
'property included.';
this.skip();
if(statusEntry === statusEntries[statusEntries.lenght - 1]) {
this.test.cell.skipMessage = 'No statusMessage ' +
'property included.';
this.skip();
} else {
continue;
}
}
}
});
Expand All @@ -297,9 +327,13 @@ describe('Issuers - BitstringStatusList',
}
// TODO test for URLS
} else {
this.test.cell.skipMessage = 'No statusReference ' +
'property included.';
this.skip();
if(statusEntry === statusEntries[statusEntries.lenght - 1]) {
this.test.cell.skipMessage = 'No statusReference ' +
'property included.';
this.skip();
} else {
continue;
}
}
}
});
Expand Down

0 comments on commit 6550701

Please sign in to comment.