Can't find modules that end with '.node'
In NodeGit we include the native module via these lines. The key part is that we're using require('../build/Release/nodegit') and not including the '.node` at the end. This will break Jest when including this in any file.
+1
I have the same problem with using Jest with https://www.npmjs.com/package/fibers.
Turns out that Jest has the option moduleFileExtensions where you can add the "node" extension. Just add this to your package.json.
"jest": {
"moduleFileExtensions": ["js", "json", "node"]
}
I think that should be the default.
This will be fixed in the next release of jest, node was added as a default!
I'm still facing this is issue on jest v23.4.1. Adding node to moduleFileExtensions resolved the issue.
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. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.