mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 19:13:55 -07:00
12 lines
407 B
TypeScript
12 lines
407 B
TypeScript
// Clears every table the services suite touches so each test starts from
|
|
// empty storage. Dexie is a real singleton, the database a real (fake-
|
|
// indexeddb) instance, so state leaks between tests otherwise.
|
|
|
|
import { dexieService } from '@app/services';
|
|
|
|
export async function resetDexie(): Promise<void> {
|
|
await Promise.all([
|
|
dexieService.settings.clear(),
|
|
dexieService.hosts.clear(),
|
|
]);
|
|
}
|