From 409a94a7d6247a761e48ce76ec3318959c90a367 Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Mon, 13 Oct 2025 13:10:14 +0200 Subject: [PATCH 1/2] pre-format --- params.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/params.js b/params.js index 0411f0cb..a0db07e4 100644 --- a/params.js +++ b/params.js @@ -94,7 +94,9 @@ class Params { return this.testList; let testList = []; if (sourceParams?.getAll) { - testList = sourceParams?.getAll(key); + for (const param of sourceParams?.getAll(key)) { + testList.push(...param.split(",")); + } } else { // fallback for cli sourceParams which is just a Map; testList = sourceParams.get(key).split(","); From bb88df781dc2caaa7b8301b1628a091e8d9f8a5e Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Mon, 13 Oct 2025 13:16:39 +0200 Subject: [PATCH 2/2] support multi suite --- params.js | 7 +++++-- tests/run-browser.mjs | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/params.js b/params.js index a0db07e4..acea9dbe 100644 --- a/params.js +++ b/params.js @@ -78,8 +78,9 @@ class Params { if (this.report && !this.startDelay) this.startDelay = 4000; - for (const paramKey of ["tag", "tags", "test", "tests"]) + for (const paramKey of ["tag", "tags", "test", "tests"]) { this.testList = this._parseTestListParam(sourceParams, paramKey); + } this.testIterationCount = this._parseIntParam(sourceParams, "iterationCount", 1); this.testWorstCaseCount = this._parseIntParam(sourceParams, "worstCaseCount", 1); @@ -101,9 +102,11 @@ class Params { // fallback for cli sourceParams which is just a Map; testList = sourceParams.get(key).split(","); } + testList = testList.map(each => each.trim()); sourceParams.delete(key); - if (this.testList.length > 0 && testList.length > 0) + if (this.testList.length > 0 && testList.length > 0) { throw new Error(`Overriding previous testList='${this.testList.join()}' with ${key} url-parameter.`); + } return testList; } diff --git a/tests/run-browser.mjs b/tests/run-browser.mjs index f1e7eb6a..52cf1235 100644 --- a/tests/run-browser.mjs +++ b/tests/run-browser.mjs @@ -61,6 +61,7 @@ async function runTests() { let success = true; try { success &&= await runEnd2EndTest("Run Single Suite", { test: "proxy-mobx" }); + success &&= await runEnd2EndTest("Run Multiple Suites", { test: "prismjs-startup-es6,postcss-wtb" }); success &&= await runEnd2EndTest("Run Tag No Prefetch", { tag: "proxy", prefetchResources: "false" }); success &&= await runEnd2EndTest("Run Disabled Suite", { tag: "disabled" }); success &&= await runEnd2EndTest("Run Default Suite");