Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Feb 2, 2025
1 parent 64d1821 commit 580c2ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/sprinkle-core/app/assets/tests/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ import { describe, expect, test, vi } from 'vitest'
import { useConfigStore } from '../stores/config'
import plugin from '..'
import * as Config from '../stores/config'
import * as Translator from '../stores/useTranslator'

const mockConfigStore = {
load: vi.fn()
}

const mockTranslatorStore = {
load: vi.fn()
}

describe('Plugin', () => {
test('should install the plugin and initiate load', () => {
vi.spyOn(Config, 'useConfigStore').mockReturnValue(mockConfigStore as any)
vi.spyOn(Translator, 'useTranslator').mockReturnValue(mockTranslatorStore as any)

plugin.install()

Expand Down

0 comments on commit 580c2ab

Please sign in to comment.