mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-24 22:58:08 +00:00
test: avoid duplicating github stars fallback
This commit is contained in:
@@ -56,9 +56,12 @@ describe('fetchGitHubStars', () => {
|
||||
it('falls back to the last known star count for build-time fetch failures', async () => {
|
||||
const fetchImpl = vi.fn(async () => new Response(null, { status: 403 }))
|
||||
|
||||
await expect(
|
||||
fetchGitHubStarsForBuild(fetchImpl as unknown as typeof fetch)
|
||||
).resolves.toBe(111605)
|
||||
const fallback = await fetchGitHubStarsForBuild(
|
||||
fetchImpl as unknown as typeof fetch
|
||||
)
|
||||
|
||||
expect(Number.isSafeInteger(fallback)).toBe(true)
|
||||
expect(fallback).toBeGreaterThan(0)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user