You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import'jest'importQuasar,*asAllfrom'quasar'import{createLocalVue,shallowMount}from'@vue/test-utils'importLoginfrom'../Login.vue'constlocalVue=createLocalVue()localVue.use(Quasar,{components: All,directives: All,plugins: All})describe('Login',()=>{test('is a Vue instance',()=>{constwrapper=shallowMount(Login,{ localVue })expect(wrapper.isVueInstance()).toBeTruthy()})})
This test now runs and passes, but I am wondering if there is a better way (if you are running tests on any of your nuxt-quasar project). Thanks in advance.
The text was updated successfully, but these errors were encountered:
I don't use Jest in any of my nuxt projects (I use AVA), so I don't currently have any recommendations. However, I'm currently working on creating the unit tests for the module itself, and am using Jest as it's more popular that AVA, so I'll look into finding any way to make testing a bit easier.
Hi @NickHurst, please - by any chance - do you have an example how to make Jest unit tests seamlessly work with
nuxt-quasar
(Quasar 1.x)?I followed recommendations in here: https://forum.quasar-framework.org/topic/1864/0-15-1-components-registering-within-jest-tests/22
// jest.config.js
// Login.spec.ts
This test now runs and passes, but I am wondering if there is a better way (if you are running tests on any of your nuxt-quasar project). Thanks in advance.
The text was updated successfully, but these errors were encountered: