diff --git a/.test-favicon.mjs b/.test-favicon.mjs index dc2c9a565ea7fb0daa40335dc8469e14564d1ac9..5c9d741806e2cb2546e9efcac29dbbea1e1d909f 100644 --- a/.test-favicon.mjs +++ b/.test-favicon.mjs @@ -49,6 +49,16 @@ function test(projectCwd) { console.log(" Phase 2: no match"); } -test("/Users/theo/Code/Work/ct/t3chat"); -test("/Users/theo/Code/Work/lawn"); -test(process.cwd()); +function getTestPaths() { + const cliPaths = process.argv.slice(2).map((p) => p.trim()).filter(Boolean); + if (cliPaths.length > 0) return cliPaths; + + const envPaths = process.env.TEST_PATHS?.split(path.delimiter).map((p) => p.trim()).filter(Boolean); + if (envPaths?.length) return envPaths; + + return [process.cwd()]; +} + +for (const p of getTestPaths()) { + test(path.resolve(p)); +}