Update E2E tests for new database folder.

This commit is contained in:
2026-05-22 01:40:09 +00:00
parent d31c09084e
commit 816c7a681e
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -1,6 +1,6 @@
import { execSync, spawn } from 'child_process'
import { join, dirname } from 'path'
import { existsSync, mkdirSync, writeFileSync } from 'fs'
import { existsSync, mkdirSync, rmSync, writeFileSync } from 'fs'
import { fileURLToPath } from 'url'
const __dirname = dirname(fileURLToPath(import.meta.url))
@@ -58,6 +58,11 @@ export default async function globalSetup() {
// Use a fresh database file for tests
const testDbFile = join(testDataDir, 'test.paskiadb')
if (existsSync(testDbFile)) {
console.log(' Removing stale test database...')
rmSync(testDbFile, { force: true, recursive: true })
}
// Start the server using Node's spawn
const serverProcess = spawn('uv', serverArgs, {
cwd: projectRoot,
+1 -1
View File
@@ -63,7 +63,7 @@ export default async function globalTeardown() {
const testDbFile = join(testDataDir, 'test.paskiadb')
if (existsSync(testDbFile)) {
console.log(' Removing test database...')
rmSync(testDbFile)
rmSync(testDbFile, { force: true, recursive: true })
}
// Generate Python coverage report if coverage was collected