docs: remove code comments about config.json

This commit is contained in:
马登山
2026-01-12 16:56:43 +08:00
parent c6f375c485
commit 2b00fdc8d2
2 changed files with 0 additions and 21 deletions
-16
View File
@@ -221,22 +221,6 @@ describe('config-helpers', () => {
json: () => Promise.resolve(null),
} as Response)
})
it('应该正确调用 fetch 并设置超时', async () => {
vi.mocked(fetch).mockResolvedValueOnce({
ok: true,
json: () => Promise.resolve({}),
} as Response)
expect(fetch).toHaveBeenCalledWith(
'https://localhost:3000/config.json',
expect.objectContaining({
method: 'GET',
headers: { 'Content-Type': 'application/json' },
signal: expect.any(AbortSignal),
})
)
})
})
describe('getConfig', () => {
-5
View File
@@ -283,11 +283,6 @@ const mergeServerConfig = (baseConfig: SiteConfig, serverConfig: ServerConfigRes
/**
* Configuration priority strategy: server > localStorage > browser > default
*
* Attempts to retrieve configuration in the following priority order:
* 1. Server configuration (from current host's /config.json)
* 2. Configuration saved in localStorage
* 3. Current browser host configuration
* 4. Default configuration (localhost:9000)
*
* @returns Promise containing the final configuration retrieval result
*