Skip to content

Commit 128477d

Browse files
Copilothustcc
andauthored
fix: update SSR test mock URL and response format for new icon service
Agent-Logs-Url: https://github.com/antvis/Infographic/sessions/0e61a01a-b243-4a83-abe0-4bdcc7d3506b Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
1 parent d2786be commit 128477d

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

__tests__/unit/ssr/examples.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ vi.mock('../../../src/utils/fetch.ts', async (importOriginal) => {
1414
return {
1515
...actual,
1616
fetchWithCache: vi.fn().mockImplementation((url, init) => {
17-
if (typeof url === 'string' && url.includes('/api/open/v1/icon')) {
17+
if (typeof url === 'string' && url.includes('/infographic/icon')) {
1818
return Promise.resolve({
1919
ok: true,
2020
json: async () => ({
21-
status: true,
22-
data: {
23-
data: [url.includes('plane') ? plane : earth],
24-
},
21+
success: true,
22+
data: [url.includes('plane') ? plane : earth],
2523
}),
2624
});
2725
}

0 commit comments

Comments
 (0)