MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / runAuto

Function runAuto

example/tests/gm_download_test.js:1078–1098  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1076 }
1077
1078 async function runAuto() {
1079 if (running) { logLine("<i>Already running — wait for the current suite to finish.</i>"); return; }
1080 running = true;
1081 setAllButtonsDisabled(true);
1082 try {
1083 const auto = tests.filter((t) => !t.manual);
1084 const names = auto.map((t) => t.name);
1085 setQueue(names.slice());
1086 logLine(`<b>Starting GM_download auto suite</b> — ${new Date().toLocaleString()} — runTag=${RUN_TAG}`);
1087 logLine(`<i>Files will appear under <code>${escapeHtml(getPrefix())}</code> with prefix <code>${escapeHtml(RUN_TAG)}-</code></i>`);
1088 for (let i = 0; i < auto.length; i++) {
1089 await runOne(auto[i], i, auto.length);
1090 setQueue(names.slice(i + 1));
1091 }
1092 setStatus("done");
1093 logLine(`<b>Done.</b> Summary — ✅ ${state.pass} ❌ ${state.fail} ⏭️ ${state.skip}`);
1094 } finally {
1095 running = false;
1096 setAllButtonsDisabled(false);
1097 }
1098 }
1099
1100 // Build manual buttons.
1101 tests.filter((t) => t.manual).forEach((t) => {

Callers 1

Calls 8

setAllButtonsDisabledFunction · 0.85
getPrefixFunction · 0.85
runOneFunction · 0.85
logLineFunction · 0.70
setQueueFunction · 0.70
escapeHtmlFunction · 0.70
setStatusFunction · 0.70
sliceMethod · 0.45

Tested by

no test coverage detected