(label, needle)
| 67 | const clean = (s) => s.replace(/\x1b\[[0-9;?]*[a-zA-Z]/g, "") |
| 68 | |
| 69 | function assertContains(label, needle) { |
| 70 | const ok = clean(stdout.output).includes(needle) |
| 71 | console.log(`${ok ? "PASS" : "FAIL"}: ${label}`) |
| 72 | if (!ok) process.exitCode = 1 |
| 73 | } |
| 74 | |
| 75 | await sleep(300) |
| 76 | const pkgVersion = JSON.parse(fs.readFileSync(new URL("./package.json", import.meta.url), "utf8")).version |