Skip to content
Snippets Groups Projects
ButtonDisplayStreakTest.spec.ts 577 B
Newer Older
Ina Martini's avatar
Ina Martini committed
import { describe, expect, it, beforeEach } from 'vitest'
import { mount } from '@vue/test-utils'
import { createPinia, setActivePinia } from 'pinia'
import ButtonComponent from '@/components/ButtonDisplayStreak.vue'

describe('ButtonComponent', () => {
    beforeEach(() => {
Ina Martini's avatar
Ina Martini committed
        setActivePinia(createPinia())
    })

    it('renders correctly', () => {
        const wrapper = mount(ButtonComponent, {
            props: {
                buttonText: 'Click me',
Ina Martini's avatar
Ina Martini committed
                type: 'goal'
            }
        })
        expect(wrapper.exists()).toBe(true)
    })
})