Files
Oxicloud/tests/e2e/spa/global-setup.ts
T
2026-08-09 13:10:09 +02:00

17 lines
539 B
TypeScript

import * as fs from 'fs';
import * as path from 'path';
import { seedAdmin } from './helpers';
/**
* Global setup for the SPA coverage suite:
* 1. Wipe `.nyc_output/` so each run starts from a clean coverage slate.
* 2. Seed the admin account against the SPA server at :8088.
*/
export default async function globalSetup() {
const nycDir = path.join(__dirname, '..', '.nyc_output');
fs.rmSync(nycDir, { recursive: true, force: true });
fs.mkdirSync(nycDir, { recursive: true });
await seedAdmin('http://127.0.0.1:8088');
}