Skip to content

Commit

Permalink
Add 'only' feature to test suite for selecting suites.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Jul 10, 2024
1 parent 28f835a commit aadeb4d
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions test/mocha/20-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ describe('issue', () => {
suiteName: 'ecdsa-rdfc-2019',
algorithm: 'P-256',
issueOptions: {},
statusOptions: {}
statusOptions: {},
tags: []
},
'ecdsa-rdfc-2019, P-384': {
suiteName: 'ecdsa-rdfc-2019',
algorithm: 'P-384',
issueOptions: {},
statusOptions: {}
statusOptions: {},
tags: []
},
'ecdsa-sd-2023': {
suiteName: 'ecdsa-sd-2023',
Expand Down Expand Up @@ -74,11 +76,20 @@ describe('issue', () => {
suiteName: 'Ed25519Signature2020',
algorithm: 'Ed25519',
issueOptions: {},
statusOptions: {}
statusOptions: {},
tags: []
}
};

for(const name in suites) {
// enable setting 'only' tag
let suitesToRun = Object.values(suites)
.filter(({tags}) => tags?.includes('only'))
.map(({suiteName}) => suiteName);
if(suitesToRun.length === 0) {
suitesToRun = Object.keys(suites);
}

for(const name of suitesToRun) {
const options = suites[name];
describe(name, () => {
// these tests run for every suite
Expand Down

0 comments on commit aadeb4d

Please sign in to comment.