mirror of
https://github.com/Elvanos/fantasia-archive.git
synced 2024-05-18 11:13:15 +12:00
20 lines
629 B
TypeScript
20 lines
629 B
TypeScript
import { installQuasar } from '@quasar/quasar-app-extension-testing-unit-vitest'
|
|
import { mount } from '@vue/test-utils'
|
|
import { Notify } from 'quasar'
|
|
import { describe, expect, it, vi } from 'vitest'
|
|
import NotifyComponent from './demo/NotifyComponent.vue'
|
|
|
|
installQuasar({ plugins: { Notify } })
|
|
|
|
describe('notify example', () => {
|
|
it('should call notify on click', async () => {
|
|
expect(NotifyComponent).toBeTruthy()
|
|
|
|
const wrapper = mount(NotifyComponent, {})
|
|
const spy = vi.spyOn(Notify, 'create')
|
|
expect(spy).not.toHaveBeenCalled()
|
|
wrapper.trigger('click')
|
|
expect(spy).toHaveBeenCalled()
|
|
})
|
|
})
|