Compare commits

...

1 Commits

Author SHA1 Message Date
abeatrix 05842341dc fix: update Playwright config and teardown error handling
- Remove teardown dependency on e2e tests to fix execution order
- Move server cleanup before file operations in teardown
- Add proper error handling and logging for cleanup operations
2025-08-05 13:49:39 -07:00
2 changed files with 5 additions and 5 deletions
-1
View File
@@ -26,7 +26,6 @@ export default defineConfig({
{
name: "cleanup test environment",
testMatch: /global\.teardown\.ts/,
dependencies: ["e2e tests"],
},
],
})
+5 -4
View File
@@ -5,9 +5,12 @@ import { ClineApiServerMock } from "../fixtures/server"
import { getResultsDir, rmForRetries } from "./helpers"
teardown("cleanup test environment", async () => {
const assetsDir = getResultsDir()
await ClineApiServerMock.stopGlobalServer()
.then(() => console.log("ClineApiServerMock stopped successfully."))
.catch((error) => console.error("Error stopping ClineApiServerMock:", error))
try {
const assetsDir = getResultsDir()
const results = await fs.readdir(assetsDir, { withFileTypes: true })
await Promise.all(
results
@@ -22,12 +25,10 @@ teardown("cleanup test environment", async () => {
}
}),
)
await ClineApiServerMock.stopGlobalServer()
console.log("ClineApiServerMock stopped successfully.")
} catch (error) {
// Silently handle case where assets directory doesn't exist
if ((error as NodeJS.ErrnoException).code !== "ENOENT") {
throw error
console.error("Error during cleanup:", error)
}
}
})