-
-
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
TypeError: sourceMap.map.originalPositionFor is not a function #5589
Comments
This was actually fixed as part of #5177 |
Wait no, I can't reproduce with jest 22.3.0. Can you create a repo showing the failure? |
Ok, here is the repository : https://github.com/jy95/mediaScan . Edit : I just need to find out why the addNewPath method isn't working in Jest when It works in its ES6 version with AVA. |
If you check the code of Filehound, you can see the methods |
Can you create a branch with the necessary change so I can reproduce? |
The only change is to replace the content of FAIL __tests__\methods\createFromJSON.ts
● Test suite failed to run
TypeError: sourceMap.map.originalPositionFor is not a function
1 | 'use strict';
> 2 | const filehound = jest.genMockFromModule('filehound');
3 |
4 | // temp files
5 | let result; Edit : from what I see on your screen, it doesn't seem jest.genMockFromModule(moduleName) is doing its job very well |
I have placed the text from OP in Please push a branch I can pull down. Will close until then |
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 about Manual Mocks with Filehound
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can
yarn install
andyarn test
.No so much, just create a
filehound.js
inside a__mocks__
folderWhat is the expected behavior?
It should work.
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Jest version : 22.3.0
Node version : 8.9.3
NPM version : 5.6.0
OS : Windows 10 Version 1709
My jest.config.js :
Edit : Without unmockedModulePathPatterns, I got
TypeError: Cannot set property 'noConflict' of undefined
like Issue 90The text was updated successfully, but these errors were encountered: