(dir: string)
| 407 | } |
| 408 | // No file a bundle actually ships looks like a leftover. |
| 409 | const walk = (dir: string): string[] => |
| 410 | fs.readdirSync(dir, { withFileTypes: true }).flatMap((e) => (e.isDirectory() ? walk(path.join(dir, e.name)) : [e.name])); |
| 411 | const distDir = path.join(__dirname, '..', 'dist'); |
| 412 | if (fs.existsSync(distDir)) expect(walk(distDir).filter((n) => aside.test(n))).toEqual([]); |
| 413 | // Deleted only after a successful swap, and a still-locked one is skipped. |