All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m27s
18 lines
453 B
TypeScript
18 lines
453 B
TypeScript
import type { FullConfig } from '@playwright/test';
|
|
import { existsSync, unlinkSync } from 'fs';
|
|
import { resolve } from 'path';
|
|
|
|
const DB_PATH = resolve(process.cwd(), 'trips.test.db');
|
|
|
|
async function globalTeardown(_config: FullConfig): Promise<void> {
|
|
for (const ext of ['', '-shm', '-wal']) {
|
|
const p = DB_PATH + ext;
|
|
if (existsSync(p)) {
|
|
unlinkSync(p);
|
|
}
|
|
}
|
|
console.log('[e2e] Removed trips.test.db');
|
|
}
|
|
|
|
export default globalTeardown;
|