check:browser-gates-guarded's comment no longer spells a literal playwright call

The runner recognises a browser gate from its file, comments included, so the
check's own comment made it one and it went NOT MEASURED on a headless seat.
The comment is reworded; detection is unchanged (stripping comments instead
dropped four real browser gates).
This commit is contained in:
Doxa Maps 2026-09-28 07:27:07 +00:00
parent 79296f87fb
commit ba131ca4a7

View file

@ -23,7 +23,7 @@ if (process.argv.includes('--list')) {
process.exit(0)
}
// A REAL import, not text that names one: a static import statement at the start of a line, or a literal
// import('playwright') / require('playwright') call. The detectors (browser-gates.mjs, this file) spell the
// dynamic import or require of the playwright package. The detectors (browser-gates.mjs, this file) spell the
// pattern inside regex literals, escaped, which none of these match, so they need no exclusion and a real
// import added to one still fails. Only the guard itself imports playwright, by design.
const DIRECT = /^\s*import\b[^;\n]*\bfrom\s+['"]playwright['"]|\bimport\(\s*['"]playwright['"]\s*\)|\brequire\(\s*['"]playwright['"]\s*\)/m