test: 更新 Live2D 初始化请求断言
This commit is contained in:
parent
590176103f
commit
5ee9dfc247
@ -265,8 +265,15 @@ describe('App', () => {
|
|||||||
});
|
});
|
||||||
await flushPromises();
|
await flushPromises();
|
||||||
|
|
||||||
expect(fetchMock).toHaveBeenCalledTimes(1);
|
const requestedUrls = fetchMock.mock.calls.map(([url]) => `${url}`);
|
||||||
expect(fetchMock).toHaveBeenCalledWith('/api/blog/theme/config');
|
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 () => {
|
it('can load WordPress migration theme config through env override', async () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user