(dir)
| 42 | const offenders = []; |
| 43 | |
| 44 | const walk = (dir) => { |
| 45 | for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { |
| 46 | const full = path.join(dir, entry.name); |
| 47 | if (entry.isDirectory()) { |
| 48 | walk(full); |
| 49 | continue; |
| 50 | } |
| 51 | if (!/\.(ts|tsx|js|jsx|mjs)$/.test(entry.name)) continue; |
| 52 | if (full === fileURLToPath(import.meta.url)) continue; |
| 53 | if ( |
| 54 | fs.readFileSync(full, "utf8").includes("plugin:websocket|disconnect") |
| 55 | ) { |
| 56 | offenders.push(path.relative(srcRoot, full)); |
| 57 | } |
| 58 | } |
| 59 | }; |
| 60 | walk(srcRoot); |
| 61 | |
| 62 | assert.deepEqual( |
no test coverage detected