quasarframework / quasar-testing

Testing Harness App Extensions for the Quasar Framework 2.0+
https://testing.quasar.dev
MIT License
179 stars 66 forks source link

jest.consig.js: moduleNameMapper is misses stores mapping #231

Closed mobsean closed 2 years ago

mobsean commented 2 years ago

Software version

OS: Win10 Node: 16.6.1 NPM: 7.20.3 Any other software related to your bug:

What did you get as the error?

FAIL test/jest/tests/MyTest.spec.ts ● Test suite failed to run

Cannot find module 'stores/layout' from 

'src/stores/auth.ts'

What were you expecting?

find module

What steps did you take, to get the error?

run a test with pinia stores

How to fix?

Add the line '^stores/(.*)$': '<rootDir>/src/stores/$1', to jest.config.js > moduleNameMapper as default.

IlCallo commented 2 years ago

Hey there, thanks for reporting the issue, could you send a PR applying this fix both to TS and JS template files?

IlCallo commented 2 years ago

Will be released in next Jest AE version