mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 03:23:56 -07:00
refactor login flow and hooks, address autologin issues
This commit is contained in:
parent
dcd6dc00f4
commit
bd2382c94e
43 changed files with 2179 additions and 484 deletions
12
webclient/integration/src/services/dexie/resetDexie.ts
Normal file
12
webclient/integration/src/services/dexie/resetDexie.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// 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(),
|
||||
]);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue