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
[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
When a first sub-application is added to the repository and it's automatically converted to the monorepo mode, a jest-e2e.json file is moved to the apps/[application]/test directory. However, a moduleNameMapper section for existing libraries is not changed, which breaks imports when e2e tests are executed.
Expected behavior
A Nest CLI should update moduleNameMapper section when it's moving the jest-e2e.json file, especially when entries that exist there were created by the CLI and were not modified by the user in any way.
Minimal reproduction of the problem with instructions
$ jest --config ./apps/app/test/jest-e2e.json
FAIL apps/app/test/app.e2e-spec.ts
● Test suite failed to run
Configuration error:
Could not locate module @app/lib mapped as:
/tmp/test-repo/app/apps/app/libs/lib/src.
Please check your configuration for these entries:
{
"moduleNameMapper": {
"/@app\/lib/": "/tmp/test-repo/app/apps/app/libs/lib/src"
},
"resolver": undefined
}
> 1 | import { LibModule } from '@app/lib';
What is the motivation / use case for changing the behavior?
Environment
Nest version: 7.5.1
For Tooling issues:
- Node version: v12.16.3
- Platform: Linux
Others:
The text was updated successfully, but these errors were encountered:
Hi @rafsawicki, I advise you to leave a minimal reproduction of a clonable git repository so that the core team can evaluate the problem you have reported.
Unfortunately, we currently don't maintain jest configuration in the monorepo mode. This will change once we merge this PR #532 (Jest will use the configuration specified in the tsconfig file)
I'm submitting a...
Current behavior
When a first sub-application is added to the repository and it's automatically converted to the monorepo mode, a
jest-e2e.json
file is moved to theapps/[application]/test
directory. However, amoduleNameMapper
section for existing libraries is not changed, which breaks imports when e2e tests are executed.Expected behavior
A Nest CLI should update
moduleNameMapper
section when it's moving thejest-e2e.json
file, especially when entries that exist there were created by the CLI and were not modified by the user in any way.Minimal reproduction of the problem with instructions
cd app nest generate library lib
What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: