diff --git a/packages/nuxt-jsonld/test/plugin.spec.ts b/packages/nuxt-jsonld/test/plugin.spec.ts deleted file mode 100644 index 79d9cd65..00000000 --- a/packages/nuxt-jsonld/test/plugin.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { describe, beforeEach, it, expect, vi, type Mock } from 'vitest'; - -import plugin from '../src/runtime/plugin'; - -const { vuePlugin, vueAppUse } = vi.hoisted(() => { - return { - vuePlugin: vi.fn(), - vueAppUse: vi.fn(), - }; -}); -vi.mock('../src/runtime/plugin-impl.ts', () => ({ - vuePlugin, -})); -vi.mock('nuxt/app', () => ({ - defineNuxtPlugin: vi.fn().mockImplementation((fn) => fn), -})); - -describe('plugin', () => { - beforeEach(() => { - vi.clearAllMocks(); - }); - - it('calles vuePlugin', () => { - plugin({ vueApp: { use: vueAppUse } } as any); - expect(vueAppUse).toBeCalledWith(vuePlugin); - }); -}); diff --git a/packages/nuxt-jsonld/vitest.config.ts b/packages/nuxt-jsonld/vitest.config.ts index 4fc63cd5..2a9a618d 100644 --- a/packages/nuxt-jsonld/vitest.config.ts +++ b/packages/nuxt-jsonld/vitest.config.ts @@ -7,6 +7,7 @@ export default defineConfig({ environment: 'happy-dom', coverage: { provider: 'istanbul', + include: ['src/runtime/**/*', '!src/runtime/plugin.ts'], }, }, });