mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-12 03:28:58 +00:00
refactor: move e2e tests to root of repository
This commit is contained in:
16
tests/utils/cleanup.util.ts
Normal file
16
tests/utils/cleanup.util.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import playwrightConfig from "../playwright.config";
|
||||
|
||||
export async function cleanupBackend() {
|
||||
const response = await fetch(
|
||||
playwrightConfig.use!.baseURL + "/api/test/reset",
|
||||
{
|
||||
method: "POST",
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(
|
||||
`Failed to reset backend: ${response.status} ${response.statusText}`
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user