quasar
Version:
Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
36 lines (30 loc) • 838 B
JavaScript
import { describe, test, expect } from 'vitest'
import { mount } from '@vue/test-utils'
import { defineComponent } from 'vue'
import useQuasar from './use-quasar.js'
describe('[useQuasar API]', () => {
describe('[Functions]', () => {
describe('[(function)default]', () => {
test('can be used in a Vue Component', () => {
const wrapper = mount(
defineComponent({
template: '<div />',
setup () {
const result = useQuasar()
return { result }
}
})
)
expect(
wrapper.vm.result
).toBeTypeOf('object')
expect(
Object.keys(wrapper.vm.result)
).not.toHaveLength(0)
expect(
wrapper.vm.result.version
).toMatch(/^\d+\.\d+\.\d+$/)
})
})
})
})