diff --git a/test/browser/renderer.html b/test/browser/renderer.html
index f1815653511..b08371cdbae 100644
--- a/test/browser/renderer.html
+++ b/test/browser/renderer.html
@@ -102,7 +102,7 @@
runner.on('pending', test => window.mocha_report('pending', serializeRunnable(test)));
};
- window.loadAndRun = async function (modules) {
+ window.loadAndRun = async function loadAndRun (modules, manual = false) {
// load
// await Promise.all(modules.map(module => new Promise((resolve, reject) =>{
// require([module], resolve, err => {
@@ -120,10 +120,20 @@
// run
return new Promise((resolve, reject) => {
- mocha.reporter(PlaywrightReporter);
+ if(!manual) {
+ mocha.reporter(PlaywrightReporter);
+ }
mocha.run(failCount => resolve(failCount === 0));
});
}
+
+
+ const modules = new URL(window.location.href).searchParams.getAll('m');
+ if(Array.isArray(modules) && modules.length > 0){
+ console.log('MANUALLY running tests', modules);
+
+ loadAndRun(modules, true).then(() => console.log('done'), err => console.log(err));
+ }