add "manual" test mode
parent
a885fbc296
commit
f96a99a577
|
@ -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));
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
Loading…
Reference in New Issue