Skip to content

Commit 224e32f

Browse files
committed
fix(og-image): fix $fetch mock type error in OgImagePackage test
1 parent dc5162a commit 224e32f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/nuxt/components/OgImagePackage.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,13 @@ describe('OgImagePackage', () => {
5757
mockFetchPackageDownloadEvolution.mockResolvedValue(downloads > 0 ? [{ value: downloads }] : [])
5858

5959
// Mock $fetch for likes endpoint
60+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6061
vi.spyOn(globalThis, '$fetch').mockImplementation(((url: string) => {
6162
if (typeof url === 'string' && url.includes('/api/social/likes/')) {
6263
return Promise.resolve({ totalLikes: 0, userHasLiked: false })
6364
}
6465
return Promise.resolve(null)
65-
}) as typeof $fetch)
66+
}) as any)
6667

6768
mockUseResolvedVersion.mockReturnValue({
6869
data: ref('1.0.0'),

0 commit comments

Comments
 (0)