reset db before each test to allow retrying
This commit is contained in:
8
frontend/tests/helpers.ts
Normal file
8
frontend/tests/helpers.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { exec } from 'child_process';
|
||||
import { promisify } from 'util';
|
||||
|
||||
const execAsync = promisify(exec);
|
||||
|
||||
export async function resetDatabase(): Promise<void> {
|
||||
await execAsync('cd .. && ./test_db.sh');
|
||||
}
|
||||
Reference in New Issue
Block a user