test: 更新 Live2D 初始化请求断言

This commit is contained in:
sunlei 2026-07-15 18:06:24 +08:00
parent 590176103f
commit 5ee9dfc247

View File

@ -265,8 +265,15 @@ describe('App', () => {
});
await flushPromises();
expect(fetchMock).toHaveBeenCalledTimes(1);
expect(fetchMock).toHaveBeenCalledWith('/api/blog/theme/config');
const requestedUrls = fetchMock.mock.calls.map(([url]) => `${url}`);
expect(requestedUrls).toHaveLength(2);
expect(requestedUrls).toEqual(
expect.arrayContaining([
'/api/blog/theme/config',
'/api/blog/live2d/pio/moc/index.json',
]),
);
expect(requestedUrls).not.toContain('/api/wordpress/theme/config');
});
it('can load WordPress migration theme config through env override', async () => {