| 5 | import { fileURLToPath } from 'node:url'; |
| 6 |
| 7 | export default function globalSetup() { |
| 8 | const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..'); |
| 9 | for (const dir of ['compat', 'generated']) { |
| 10 | const d = path.join(root, 'reports', dir); |
| 11 | if (!fs.existsSync(d)) continue; |
| 12 | for (const f of fs.readdirSync(d)) if (f.endsWith('.result.json')) fs.unlinkSync(path.join(d, f)); |
| 13 | } |
| 14 | } |
| 15 |