Why: establish baseline web runtime scaffold before wave implementation. What: add react app structure, docker runtime assets, docs runbooks, and ignore policy updates. Rule: keep technical intent and repository workflow compliance.
19 lines
514 B
TypeScript
19 lines
514 B
TypeScript
import { describe, expect, it, vi } from 'vitest';
|
|
|
|
vi.mock('./client', () => ({
|
|
getJson: vi.fn()
|
|
}));
|
|
|
|
import { getJson } from './client';
|
|
import { loadDashboard } from './dashboardApi';
|
|
|
|
describe('loadDashboard', () => {
|
|
it('builds encoded endpoint path and delegates to getJson', async () => {
|
|
vi.mocked(getJson).mockResolvedValue({ ok: true });
|
|
|
|
await loadDashboard('demo context/1');
|
|
|
|
expect(getJson).toHaveBeenCalledWith('/api/customer/orders/status?contextId=demo%20context%2F1');
|
|
});
|
|
});
|