Closed kutenai closed 5 years ago
The log looks strange, it is possible that something is wrong with your machine/disk. Please try
module.exports = function(wallaby) {
return {
files: [
'src/**/*.js'
],
tests: [
'__test__/**/*.js'
],
env: {
type: 'node',
runner: 'node'
},
compilers: {
'**/*.js?(x)': wallaby.compilers.babel()
},
testFramework: 'jest',
setup: function(wallaby) {
var jestConfig = require('./package.json').jest
jestConfig.globals = {'__DEV__': true}
wallaby.testFramework.configure(jestConfig)
}
}
}
I have to have at least this in files:
files: [
'src/**/*.js',
'./*.js'
],
I didn't restart, as that is a major event. I have a MacPro, and I don't restart more than once every few weeks. I don't see any other indications of an issue on the system itself.
I'ts very late here, and I'm leaving town for a week the day after tomorrow, so I kind of don't have a lot of time to deal with this right now.
We have not had any reports of any similar problem from any other users, and the last update was released ~5 days ago. If it was an issue with Wallaby update, we'd get many issues raised by now, so my guess is that the issue is somehow related to your environment. That is why I suggested a restart as a way to check if it helps.
I'ts very late here, and I'm leaving town for a week the day after tomorrow, so I kind of don't have a lot of time to deal with this right now.
No worries at all, please let us know when you have some time to resume the issue investigation and I'll reopen the issue.
I am getting this now:
tests:
{ ignore: false, instrument: true, trigger: true, load: true } } }
Runtime error: TypeError: require(...) is not a function
at Object.<anonymous> (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/core-js/modules/_classof.js:3:11)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:858:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:551:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:415:10)
at Runtime.requireModuleOrMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:562:21)
at Object.require (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/core-js/modules/es6.object.to-string.js:3:15)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:858:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:551:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:415:10)
at Runtime.requireModuleOrMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:562:21)
at Object.<anonymous> (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/core-js/modules/es6.date.to-string.js:7:1)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:858:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:551:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:415:10)
at Runtime.requireModuleOrMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:562:21)
at Object.<anonymous> (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/core-js/modules/_to-primitive.js:5:1)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:858:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:551:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:415:10)
at Runtime.requireModuleOrMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:562:21)
at Object.require (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/core-js/modules/_object-dp.js:3:19)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:858:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:551:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:415:10)
at Runtime.requireModuleOrMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:562:21)
at Object.require (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/core-js/modules/es6.object.define-property.js:3:89)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:858:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:551:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:415:10)
at Runtime.requireModuleOrMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:562:21)
at Object.<anonymous> (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/core-js/modules/_descriptors.js:3:1)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:858:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:551:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:415:10)
at Runtime.requireModuleOrMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:562:21)
at Object.require (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/core-js/modules/es6.regexp.flags.js:2:5)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:858:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:551:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:415:10)
at Runtime.requireModuleOrMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:562:21)
at Object.<anonymous> (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/core-js/modules/es6.regexp.to-string.js:5:1)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:858:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:551:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:415:10)
My jest config looks like this:
"jest": {
"modulePathIgnorePatterns": [
"cypress/*",
"node_modules"
],
"moduleNameMapper": {
"~/(.*)": "<rootDir>/src/$1",
"\\.local\\.(css|scss)$": "identity-obj-proxy"
},
"roots": [
"<rootDir>"
],
"transformIgnorePatterns": ["\\.local\\.scss$"],
"transform": {
"^.+\\.jsx?$": "babel-jest",
"\\.(scss|css)$": "<rootDir>/styleMocks.js"
},
"unmockedModulePathPatterns": [
"react",
"enzyme",
"jest-enzyme"
],
"testURL": "http://localhost/",
"setupFilesAfterEnv": [
"<rootDir>/enzyme_config.js"
]
},
I've been trying to adjust the jest config to work. I've had the same wallaby config for a while, so I don't think that is an issue. I have made adjustments to jest, but if I go back to the original way, I get other errors and jest warnings about updates.
One last thing before I head out. I updated my node modules and now I get this error:
Runtime error: Error: Cannot find module 'core-js/modules/es6.function.bind' from 'jasmine2Initializer.js'
at Resolver.resolveModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-resolve/build/index.js:230:17)
at Resolver._getVirtualMockPath (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-resolve/build/index.js:361:14)
at Resolver._getAbsolutePath (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-resolve/build/index.js:347:14)
at Resolver.getModuleID (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-resolve/build/index.js:319:31)
at Runtime._shouldMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:943:37)
at Runtime.requireModuleOrMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:595:16)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:888:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:577:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:433:10)
at config.setupFilesAfterEnv.forEach.path (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:186:55)
at Array.forEach (<anonymous>)
at /Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:186:31
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:27:24)
at _next (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:47:9)
at /Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:52:7
at new Promise (<anonymous>)
at /Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:44:12
at _jasmine (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:206:19)
at jasmine2 (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:60:19)
at /Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runner/build/runTest.js:385:24
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runner/build/runTest.js:161:24)
at _next (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runner/build/runTest.js:181:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
This is what I get in Wallaby console (using PyCharm) after waiting a long time - upwards of 10 minutes, but might be closer to 5 (it's a while). So it "finally" works, but not properly. It seems like it's indexing the entire node_modules??
Runtime error: TypeError: require(...) is not a function
Not yet sure what could be causing it, but I have spotted something in your Jest config that could potentially be causing some issues. You have overridden transformIgnorePatterns
setting, and, if I'm not mistaken, it is making Jest (even without Wallaby) to transform all of your node_modules
. Try making this change to your Jest config:
-"transformIgnorePatterns": ["\\.local\\.scss$"],
+"transformIgnorePatterns": ["\\.local\\.scss$", "/node_modules/"],
Also try making the following changes to your Wallaby config:
module.exports = function(wallaby) {
return {
files: [
'src/**/*.js',
- './*.json',
- './*.js',
+ 'babel.config.js',
+ 'enzyme_config.js',
+ 'fileTransformer.js'
],
tests: [
'__test__/**/*.js'
],
env: {
type: 'node',
runner: 'node'
},
compilers: {
'**/*.js?(x)': wallaby.compilers.babel()
},
testFramework: 'jest',
setup: function(wallaby) {
var jestConfig = require('./package.json').jest
jestConfig.globals = {'__DEV__': true}
+ delete jestConfig.roots;
wallaby.testFramework.configure(jestConfig)
}
}
}
I saw that as well. I went a little crazy, but here is the current version
"transformIgnorePatterns": [
"<rootDir>/node_modules/",
"<rootDir>/stories/",
"<rootDir>/.storybook/",
"<rootDir>/dist.prod/",
"<rootDir>/dist.dev/",
"<rootDir>/hot/",
"<rootDir>/scripts/",
"<rootDir>/dist.analyze/",
"<rootDir>/cypress/",
"\\.local\\.scss$"
],
But the issue persists.
Runtime error: Error: Cannot find module 'core-js/modules/es6.function.bind' from 'jasmine2Initializer.js'
at Resolver.resolveModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-resolve/build/index.js:230:17)
at Resolver._getVirtualMockPath (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-resolve/build/index.js:361:14)
at Resolver._getAbsolutePath (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-resolve/build/index.js:347:14)
at Resolver.getModuleID (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-resolve/build/index.js:319:31)
at Runtime._shouldMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:943:37)
at Runtime.requireModuleOrMock (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:595:16)
at Runtime._execModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:888:13)
at Runtime._loadModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:577:12)
at Runtime.requireModule (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runtime/build/index.js:433:10)
at config.setupFilesAfterEnv.forEach.path (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:186:55)
at Array.forEach (<anonymous>)
at /Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:186:31
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:27:24)
at _next (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:47:9)
at /Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:52:7
at new Promise (<anonymous>)
at /Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:44:12
at _jasmine (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:206:19)
at jasmine2 (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-jasmine2/build/index.js:60:19)
at /Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runner/build/runTest.js:385:24
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runner/build/runTest.js:161:24)
at _next (/Volumes/sharpertool/proj/gardentronic/gardentronic/gardenbuzz_client/node_modules/jest-runner/build/runTest.js:181:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
Runtime error: Error: Cannot find module 'core-js/modules/es6.function.bind'
Not sure what's causing it, but can you try this in your Jest config:
"transformIgnorePatterns": [
"<rootDir>/node_modules/",
"<rootDir>/stories/",
"<rootDir>/.storybook/",
"<rootDir>/dist.prod/",
"<rootDir>/dist.dev/",
"<rootDir>/hot/",
"<rootDir>/scripts/",
"<rootDir>/dist.analyze/",
"<rootDir>/cypress/",
+ "jasmine2Initializer",
"\\.local\\.scss$"
],
and this in your Wallaby config:
setup: function(wallaby) {
var jestConfig = require('./package.json').jest
jestConfig.globals = {'__DEV__': true}
delete jestConfig.roots;
+ delete jestConfig.transform['^.+\\.jsx?$'];
wallaby.testFramework.configure(jestConfig)
}
This is so frustrating.
I tried your suggestions. That took out that one particular error. Now I get this:
expect(received).not.toBe(expected) // Object.is equality
Expected: not 1
at Object.<anonymous> (../../../../Users/ed/Library/Caches/PyCharm2019.1/wallaby/projects/680ad6fbdf4c6811/instrumented/__tests__/tronictalk/sagas.test.js:11:36)
at Object.e.length.arguments.(anonymous function) (../../../../Users/ed/Library/Caches/PyCharm2019.1/wallaby/wallaby/runners/node/jest@0.4.3/jasmine2Initializer.js:14:1786)
Some long running code has been detected: one of your tests is taking more than 5000ms to execute.
The last recorded console.log: PASS __tests__/tronictalk/api.spec.js
Some long running code has been detected: one of your tests is taking more than 5000ms to execute.
The last recorded console.log: PASS __tests__/VendorIndexPage/vendor_index_page.spec.js
Some long running code has been detected: one of your tests is taking more than 5000ms to execute.
The last recorded console.log: ● Sagas Tests › Just fail!
expect(received).not.toBe(expected) // Object.is equality
Expected: not 1
at Object.<anonymous> (../../../../Users/ed/Library/Caches/PyCharm2019.1/wallaby/projects/680ad6fbdf4c6811/instrumented/__tests__/tronictalk/sagas.test.js:11:36)
at Object.e.length.arguments.(anonymous function) (../../../../Users/ed/Library/Caches/PyCharm2019.1/wallaby/wallaby/runners/node/jest@0.4.3/jasmine2Initializer.js:14:1786)
``
The funny ting is, I've removed ALL tests of any significance, and stripped down the remaining tests to literally be this:
```javascript
describe('API Methods', () => {
test('Can query comments', () => {
expect(true).not.toBe(true)
})
})
And yet, It's taking MANY seconds, or 1-2 minutes to just update if I change a value from true to false, etc.
Just to be sure, I rebooted my system also, so I could rule that out. I get the exact same results.
Here is my complete package.json
{
"name": "@bigzeta/datapages-client",
"version": "0.0.0",
"description": "Client side javascript development bundler for datapages. Basic feature at the moment is react with fabricjs intergration",
"main": "index.js",
"author": "jo",
"license": "UNLICENSED",
"scripts": {
"test": "jest --notify --detectOpenHandles",
"build_modules": "./scripts/rebuild_all.sh",
"hot": "yarn run build_modules && cross-env NODE_ENV=development PROTOCOL=http webpack-dev-server --hot --env.stage=hot --mode=development",
"hots": "yarn run build_modules && cross-env NODE_ENV=development PROTOCOL=https webpack-dev-server --hot --env.https=true --env.stage=hot --mode=development",
"compile:dev": "cross-env NODE_ENV=development webpack --env.stage=dev --mode=development --profile --progress --colors",
"compile:prod": "rimraf dist.prod && cross-env NODE_ENV=production webpack -p --env.stage=prod --profile --colors",
"compile:analyze": "rimraf dist.analyze/* && cross-env NODE_ENV=production webpack --env.stage=analyze",
"compile:blah": "cross-env NODE_ENV=production webpack -p --env.stage=blah --profile --colors",
"analyze": "npm run clean:analyze && npm run compile:analyze",
"analyze:view": "webpack-bundle-analyzer dist.analyze/stats.json",
"lint": "eslint *.js src/",
"lint:fix": "npm run lint -- --fix",
"test:watch": "npm run test -- --watch",
"coverage": "NODE_PATH=src jest --coverage",
"clean": "rimraf dist.dev dist.prod",
"clean:analyze": "rimraf dist.analyze/*",
"storybook": "start-storybook -p 6007 -c .storybook -s ../django_root/",
"build-storybook": "build-storybook"
},
"dependencies": {
"@babel/polyfill": "7.4.4",
"@google/maps": "^0.5.5",
"@redux-beacon/google-analytics": "^1.2.2",
"@redux-beacon/google-tag-manager": "^1.0.1",
"@u-wave/react-vimeo": "^0.6.0",
"@vimeo/player": "^2.9.1",
"axios": "0.19.0",
"classnames": "^2.2.6",
"core-js": "3.1.4",
"draft-convert": "^2.1.5",
"draft-js": "^0.10.5",
"draftail": "^1.2.1",
"drag-scroll-provider": "^1.0.6",
"firebase": "^6.2.0",
"formik": "1.5.7",
"google-maps-react": "^2.0.2",
"js-cookie": "^2.2.0",
"lodash": "4.17.11",
"normalizr": "^3.4.0",
"prop-types": "^15.6.2",
"ramda": "^0.26.1",
"react": "16.8.6",
"react-dom": "^16.8.4",
"react-dropzone": "^10.1.5",
"react-facebook-login": "4.1.1",
"react-image-lightbox": "^5.1.0",
"react-modal": "^3.8.1",
"react-outside-click-handler": "^1.2.3",
"react-popper": "^1.3.2",
"react-redux": "7.1.0",
"react-responsive": "^7.0.0",
"react-transition-group": "^4.1.1",
"reactstrap": "8.0.0",
"redux": "4.0.1",
"redux-actions": "^2.6.5",
"redux-beacon": "^2.1.0",
"redux-form": "8.2.4",
"redux-saga": "1.0.3",
"redux-saga-firebase": "^0.15.0",
"reselect": "^4.0.0",
"scroll-into-view-if-needed": "^2.2.20",
"styled-components": "^4.3.1",
"validator": "^11.0.0",
"video-react": "^0.13.9",
"yup": "0.27.0"
},
"devDependencies": {
"@babel/cli": "7.4.4",
"@babel/core": "7.4.5",
"@babel/plugin-proposal-class-properties": "7.4.4",
"@babel/plugin-transform-modules-commonjs": "7.4.4",
"@babel/preset-env": "7.4.5",
"@babel/preset-react": "7.0.0",
"@babel/register": "7.4.4",
"@sambego/storybook-state": "^1.3.4",
"@storybook/addon-actions": "^5.1.8",
"@storybook/addon-knobs": "^5.1.8",
"@storybook/addon-links": "^5.1.8",
"@storybook/addon-viewport": "^5.1.8",
"@storybook/addons": "^5.1.8",
"@storybook/react": "^5.1.8",
"@storybook/theming": "^5.1.8",
"@testing-library/react": "^8.0.1",
"addon-redux": "^1.0.0",
"alias-quokka-plugin": "^0.1.0",
"autoprefixer": "9.6.0",
"axios-mock-adapter": "^1.16.0",
"babel-alias-quokka-plugin": "^1.0.9",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.8.0",
"babel-loader": "8.0.6",
"babel-plugin-redux-saga": "^1.0.2",
"babel-plugin-styled-components": "^1.10.1",
"bootstrap": "^4.3.0",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"chalk": "2.4.2",
"cors": "2.8.5",
"cross-env": "5.2.0",
"css-loader": "3.0.0",
"dotenv": "8.0.0",
"dotenv-expand": "5.1.0",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.14.0",
"eslint": "5.16.0",
"eslint-config-react-app": "4.0.1",
"eslint-loader": "2.1.2",
"eslint-plugin-flowtype": "3.10.3",
"eslint-plugin-import": "2.17.3",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.13.0",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "4.0.0",
"font-awesome": "4.7.x",
"fs-extra": "8.0.1",
"html-webpack-plugin": "3.2.0",
"identity-obj-proxy": "^3.0.0",
"jest": "24.8.0",
"jest-dom": "^3.5.0",
"jest-enzyme": "^7.0.2",
"mini-css-extract-plugin": "0.7.0",
"node-sass": "4.12.0",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"precss": "4.0.0",
"promise": "8.0.3",
"raf": "3.4.1",
"react-dev-utils": "9.0.1",
"react-hot-loader": "4.11.1",
"react-test-renderer": "16.8.6",
"redux-devtools": "^3.5.0",
"redux-devtools-dock-monitor": "^1.1.3",
"redux-devtools-extension": "^2.13.8",
"redux-devtools-log-monitor": "^1.4.0",
"regenerator-runtime": "0.13.2",
"resolve": "1.11.0",
"sass-loader": "7.1.0",
"sinon": "7.3.2",
"style-loader": "0.23.1",
"sw-precache-webpack-plugin": "0.11.5",
"url-loader": "2.0.0",
"webpack": "4.34.0",
"webpack-bundle-analyzer": "^3.1.0",
"webpack-bundle-tracker": "0.4.2-beta",
"webpack-cli": "3.3.4",
"webpack-dev-server": "3.7.2",
"webpack-merge": "4.2.1"
},
"jest": {
"modulePathIgnorePatterns": [
"cypress/*",
"node_modules"
],
"moduleNameMapper": {
"~/(.*)": "<rootDir>/src/$1",
"\\.local\\.(css|scss)$": "identity-obj-proxy"
},
"roots": [
"<rootDir>"
],
"transformIgnorePatterns": [
"<rootDir>/node_modules/",
"<rootDir>/stories/",
"<rootDir>/.storybook/",
"<rootDir>/dist.prod/",
"<rootDir>/dist.dev/",
"<rootDir>/hot/",
"<rootDir>/scripts/",
"<rootDir>/dist.analyze/",
"<rootDir>/cypress/",
"jasmine2Initializer",
"\\.local\\.scss$"
],
"transform": {
"^.+\\.jsx?$": "babel-jest",
"\\.(scss|css)$": "<rootDir>/styleMocks.js"
},
"unmockedModulePathPatterns": [
"react",
"enzyme",
"jest-enzyme"
],
"testURL": "http://localhost/",
"setupFilesAfterEnv": [
"<rootDir>/enzyme_config.js"
]
},
"quokka": {
"babel": true,
"plugins": [
"babel-alias-quokka-plugin"
],
"alias": {
"~": "./src"
},
"pro": true
}
}
Here is my babel.config.js
'use strict'
const presets = [
[
'@babel/env',
{
useBuiltIns: 'usage',
corejs: '3'
},
],
'@babel/preset-react',
];
const plugins = [
'@babel/plugin-transform-modules-commonjs',
'@babel/plugin-proposal-class-properties',
'babel-plugin-styled-components'
]
module.exports = {presets, plugins}
enzyme_config.js
import Enzyme from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
Enzyme.configure({ adapter: new Adapter() })
styleMocks.js
This file is for mocking CSS, SASS modules
*/
const path = require('path');
module.exports = {
process(src, filename, config, options) {
return 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';';
},
};
And of course wallaby.js
module.exports = function(wallaby) {
console.log(wallaby)
return {
files: [
'./*.json',
'src/**/*.js',
'./*.js'
],
tests: [
'__tests__/**/*.spec.js',
'__tests__/**/*.test.js'
],
env: {
type: 'node',
runner: 'node'
},
compilers: {
'**/*.js?(x)': wallaby.compilers.babel()
},
testFramework: 'jest',
setup: function(wallaby) {
var jestConfig = require('./package.json').jest
delete jestConfig.roots
delete jestConfig.transform['^.+\\.jsx?$']
delete jestConfig.moduleNameMapper['\\.local\\.(css|scss)$']
jestConfig.globals = {'__DEV__': true}
wallaby.testFramework.configure(jestConfig)
},
//debug: true
}
}
Also, I am running wallaby inside of PyCharm, and have the Node.js set to: /Volumes/sharpertool/Users/ed/.nvm/versions/node/v10.16.0/bin/node
So latest LTS version. I've also tried "SystemDefault", but no change
I will be out of town for a week. I'd like to resolve this but won't be able to take action on this till I return. This issue is on my MacPro, not my laptop.
I think I've discovered "the problem". It's not something simple and it's not obvious, at all. First, I just uninstalled and re-installed wallaby. I started with a fresh configuration, step by step I added more. Added testFramework for 'jest', and then added in the config for jest, etc.
The config I added for jest was the exact same one (but I copied it from out of package.json).
I also had reset wallaby.js files to jus be files: ['src/**/*.js']
Wallaby then said it could not fine styleMocks.js, so I added that to files, and went through this a few times until it was happy. Resulting files was:
files: [
'src/**/*.js',
'jest.config.js',
'styleMocks.js',
'enzyme_config.js',
]
As I looked at this and compared it with a copy of previous wallaby.js, I saw only one difference. Old wallaby had this as files:
files: [
'./*.json',
'src/**/*.js',
'./*.js'
],
So I added that line: './*.js', and bang -- all of the bad stuff started happening again. Remove it, and it's fine again.
I then tried to add this line: './*.json', and again, bad stuff happens. So, looks like those lines are an issue. I removed the leading './' from them, but same issue.
I'm not sure what js or json files I have at the top level, or, maybe something else happens when adding '.js' or '.json' to files?
Whatever it is, it's bad, at least for me. I'd suspect some odd .js file, but it happens if I use .js OR .json.
Okay -- I did an experiment, I added '.blahblah' to the files list. I don't have such a file, so it's going to find nothing. Turns out, this ALSO messes up wallaby. So, putting '.
Or, it's a bad thing IN THE CURRENT VERSION because I've had those lines in my config for a long time!!!! Now, it's broken. So, sure, maybe that isn't common config, and so no other users saw that issue, but I'm thinking it IS an issue with recent versions of wallaby
Anyway -- I'm back to working. I wasted about 6 hours of time, which just boggles my mind (
Great to hear the issue is resolved for you. We will investigate why .blah
files are breaking Wallaby (however we can't reproduce it locally on the same OS, so the issue may still be related to your environment).
Issue description or question
Just tried to use wallaby after not using it for a while, and it's just completely busted. There have been multiple updates since I last used it.
My unit tests (jest) work fine, but wallaby never finishes. I get this error also
Wallaby Notification: Wallaby stopped unexpectedly. Exit code: 137, Error Message: null
Wallaby.js configuration file
Code editor or IDE name and version
PyCharm v2019.1.3 Build #py-191.7479.30
OS name and version
OSX 10.13.6 wallaby.log