build: allow script/spec-runner.js with empty list of runners (#34002)

Co-authored-by: Milan Burda <milan.burda@gmail.com>
This commit is contained in:
trop[bot]
2022-05-02 09:45:40 -04:00
committed by GitHub
parent f6a2c296d8
commit 853693bc87

View File

@@ -41,8 +41,8 @@ const runners = new Map([
const specHashPath = path.resolve(__dirname, '../spec/.hash');
let runnersToRun = null;
if (args.runners) {
runnersToRun = args.runners.split(',');
if (args.runners !== undefined) {
runnersToRun = args.runners.split(',').filter(value => value);
if (!runnersToRun.every(r => [...runners.keys()].includes(r))) {
console.log(`${fail} ${runnersToRun} must be a subset of [${[...runners.keys()].join(' | ')}]`);
process.exit(1);