-
Notifications
You must be signed in to change notification settings - Fork 45
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 thrown from 'require' statement in jest-environment-jsdom #973
Comments
I'm not sure if it's related to the issue or not, but what you're doing in your config (using webpack + node env) is not supported by wallaby.js. Try removing webpack (neither jest, not wallaby.js needs it to run your tests): module.exports = (wallaby) => {
return {
tests: [
'src/**/*.spec.js'
],
files: [
'!src/**/*.spec.js',
{ pattern: 'src/**/*.jsx', load: false },
{ pattern: 'src/**/*.js', load: false },
{ pattern: 'tests/**/*.snap' }
],
compilers: {
'**/*.js*': wallaby.compilers.babel(),
},
env: {
type: 'node',
runner: 'node',
},
testFramework: 'jest',
debug: true,
bootstrap(w) {
w.testFramework.configure({
setupFiles: [
'./config/jestConfig.js',
],
moduleFileExtensions: [
'js',
'jsx',
'json',
],
coverageDirectory: './coverage',
});
},
};
}; |
I removed the |
Could you please share a sample repo where I could reproduce the issue to have a look? |
I created a simple repo here /~https://github.com/jonboiser/wallaby-jest-problem with some instruction in the README, which seems to isolate the issue to conflicting versions of jsdom (one in the root of node_modules, and one that is a dependency of jest). A simple fix for my project will be to remove the extra jsdom dependency, but it seems there might be a new issue in Wallaby, since I've been working with this configuration for months and have only run into this issue yesterday. |
Have same problem for sublime |
Thanks for the repo! The issue is a regression from our very recent changes in the algorithms of node module resolution for the node runner. The issue is fixed and the fix is published in the latest core. |
Issue description or question
Just starting today, my entire test suite will not run, and this error appears in the console:
this is the offending line in the stack trace.
In the console, the errors appear after the files are loaded and these "running tests in sandbox" messages:
Jest CLI runs fine. Before filing this issue, #961 seemed relevant, because it is also related to node_modules resolution.
Wallaby.js configuration file
Code editor or IDE name and version
Atom v1.13.1
OS name and version
OSX 10.11.6
The text was updated successfully, but these errors were encountered: