Closed mobsean closed 2 years ago
OS: Win10 Node: 16.6.1 NPM: 7.20.3 Any other software related to your bug:
FAIL test/jest/tests/MyTest.spec.ts ● Test suite failed to run
Cannot find module 'stores/layout' from
'src/stores/auth.ts'
find module
run a test with pinia stores
Add the line '^stores/(.*)$': '<rootDir>/src/stores/$1', to jest.config.js > moduleNameMapper as default.
'^stores/(.*)$': '<rootDir>/src/stores/$1',
Hey there, thanks for reporting the issue, could you send a PR applying this fix both to TS and JS template files?
Will be released in next Jest AE version
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
'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.