Don't fail test if we can't cleanup (#14389)

This commit is contained in:
Tommaso Sciortino
2025-12-02 10:25:22 -08:00
committed by GitHub
parent f7f047936b
commit 71b0e7ab0d

View File

@@ -74,6 +74,10 @@ export async function setup() {
export async function teardown() {
// Cleanup the test run directory unless KEEP_OUTPUT is set
if (process.env['KEEP_OUTPUT'] !== 'true' && runDir) {
await rm(runDir, { recursive: true, force: true });
try {
await rm(runDir, { recursive: true, force: true });
} catch (e) {
console.warn('Failed to clean up test run directory:', e);
}
}
}