Files
purewhiter--mobilegym/tests/appDataLoaderReady.test.ts
wehub-resource-sync 2114b14ee0
Sync main into demo / sync (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:26 +08:00

17 lines
579 B
TypeScript

import { describe, expect, it } from 'vitest';
import { runAppDataLoaderModule } from '../os/appDataLoaderReady';
describe('app data loader readiness protocol', () => {
it('runs preload, hydrateStore, then waitReady in order', async () => {
const calls: string[] = [];
await runAppDataLoaderModule({
preload: async () => { calls.push('preload'); },
hydrateStore: async () => { calls.push('hydrateStore'); },
waitReady: async () => { calls.push('waitReady'); },
});
expect(calls).toEqual(['preload', 'hydrateStore', 'waitReady']);
});
});