mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-18 17:23:26 +03:00
17 lines
353 B
TypeScript
17 lines
353 B
TypeScript
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}`
|
|
);
|
|
}
|
|
}
|