-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support mock of scoped modules that are symlink with lerna #4760
Comments
Mocking scoped deps definitely works, I do it quite extensively in projects at work. Do you have a full repro instead of an example snippet? |
is there a chance that since it's symlinked lib (using lerna) it affects the mocking somehow? ( I guess not, but worth asking..) |
Perhaps. There was a fix merged yesterday for symlinks (#4761), so you can try |
@SimenB I tried, though it is still using the original module instead of the mocked one. My problem is that the dep module is written with ES6 and not transpiled using babel, since it's under node_modules. so mocking it seems like a correct solution. At first I thought to transpile it, thought I could not configure babel nor pointing jest to webpack config in order to transpile this specific module under node_modules. yet again, mocking it seems like a better solution for me. |
Please provide a repro. Note that this is not a help forum |
I Could not mock modules which are symlinked (using |
@SimenB same here. When using Lerna with symlinked packages I must use the |
I'm getting this error just including any scoped module, regardless of whether I am mocking anything. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
bug, while using ES6 modules and babelrc.
What is the current behavior?
my scoped package in node_modules is not mocked using :
What is the expected behavior?
the module will be mocked
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
node - v8.4.0
npm - 5.2.0
jest - 21.2.0
OS - macOS
The text was updated successfully, but these errors were encountered: