#!/usr/bin/env node import { readFile } from 'node:fs/promises' import path from 'node:path' const root = process.cwd() const mustNoSkip = [ 'packages/bare-os-booter/test.bare-os-www.js', 'packages/bare-os-booter/test.bare-os-ssh-holesail.js' ] const mustNoWeak = [ 'packages/bare-os-booter/test.kernel.js', 'packages/bare-os-booter/test.vfs.js', 'packages/bare-os-booter/test.shell.js', 'packages/bare-os-booter/test.initd-fish.js', 'packages/bare-os-booter/test.coreutils.js', 'packages/bare-os-booter/test.runtime.js', 'packages/bare-os-booter/test.bare-os-www.js', 'packages/bare-os-booter/test.bare-os-ssh-holesail.js' ] let bad = 0 for (const rel of mustNoSkip) { const p = path.join(root, rel) const txt = await readFile(p, 'utf8') if (/\btest\.skip\(/.test(txt)) { console.error(`${rel}: contains test.skip`) bad++ } } for (const rel of mustNoWeak) { const p = path.join(root, rel) const txt = await readFile(p, 'utf8') if (/t\.ok\(true\)/.test(txt)) { console.error(`${rel}: contains t.ok(true)`) bad++ } } if (bad > 0) process.exit(1) console.log('verify-reliability-gates: ok')