All Questions
4 questions
1
vote
0
answers
136
views
Failed to resolve import "#app/composables/script-stubs (Vitest)
I am receiving the error 'Failed to resolve import "#app/composables/script-stubs"' inside the .nuxt folder in the imports.d.ts file
My code is like this and I've tried importing everything.....
2
votes
0
answers
2k
views
Testing in nuxt 3 (vitest/jest)
I have a nuxt 3.2.3 app and i want to test it. Nuxt is supporting both Jest and Vitest for testing, but i read somewhere that Vitest is the recommended one.
On the other hand @nuxt/test-utils package ...
1
vote
0
answers
2k
views
Aliases not resolved in vitest
I want to use aliases in tests files with vitest:
import { describe, expect, it } from 'vitest'
import Plan from '@/modules/Pricing/models/Plan'
let plan: Plan
describe('Plan model', () => {
it(...
7
votes
4
answers
7k
views
Testing Pinia store inside Nuxt3 with vitest throws `useRuntimeConfig` not defined
I am testing pinia store in nuxt3 app.
Inside setup() of store I'm using useRuntimeConfig to get initial value for counter from public config variables and I got this error ReferenceError: ...