Skip to content

Commit ecf5374

Browse files
authored
fix
1 parent 004d040 commit ecf5374

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/nuxt/composables/use-compare-replacements.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { afterEach, describe, expect, it, vi } from 'vitest'
22
import { mountSuspended } from '@nuxt/test-utils/runtime'
3-
import type { ModuleReplacement } from 'module-replacements'
3+
import type { ModuleReplacement, SimpleModuleReplacement } from 'module-replacements'
44
import type { ReplacementSuggestion } from '~/composables/useCompareReplacements'
55

66
/**
@@ -234,7 +234,7 @@ describe('useCompareReplacements', () => {
234234

235235
vi.stubGlobal('$fetch', fetchMock)
236236

237-
const { replacements } = await useCompareReplacementsInComponent(['some-package'])
237+
const { noDepSuggestions, infoSuggestions, replacements } = await useCompareReplacementsInComponent(['some-package'])
238238

239239
await vi.waitFor(() => {
240240
expect(fetchMock).toHaveBeenCalledTimes(1)
@@ -254,11 +254,11 @@ describe('useCompareReplacements', () => {
254254
.fn()
255255
.mockRejectedValueOnce(new Error('Temporary network error'))
256256
.mockResolvedValueOnce({
257-
type: 'simple',
258-
moduleName: 'is-even',
259-
replacement: 'Use (n % 2) === 0',
260-
category: 'micro-utilities',
261-
} satisfies ModuleReplacement)
257+
"id": "snippet::is-even",
258+
"type": "simple",
259+
"description": "You can use the modulo operator to check if a number is even.",
260+
"example": "(n % 2) === 0",
261+
} satisfies SimpleModuleReplacement)
262262

263263
vi.stubGlobal('$fetch', fetchMock)
264264

0 commit comments

Comments
 (0)