You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like eslint crashes on a specific file in my project:
constrequest=require('supertest');describe('eslintplugin-jest PoC',()=>{test('should not crash',()=>newPromise((done)=>{request()// Some parts of the code not reproduced here but issue will happen with this simplified file.then(()=>{expect(1).toBe(1);returndone();});}));});
Stacktrace:
$ /some/frontend_project/node_modules/.bin/eslint server/poc.js
TypeError: Cannot read property 'type' of undefined
at isPromiseReturnedLater (/some/frontend_project/node_modules/eslint-plugin-jest/rules/valid-expect-in-promise.js:61:24)
at isParentThenOrPromiseReturned (/some/frontend_project/node_modules/eslint-plugin-jest/rules/valid-expect-in-promise.js:92:5)
at promiseCallbacks.some.promiseCallback (/some/frontend_project/node_modules/eslint-plugin-jest/rules/valid-expect-in-promise.js:107:10)
at Array.some (<anonymous>)
at verifyExpectWithReturn (/some/frontend_project/node_modules/eslint-plugin-jest/rules/valid-expect-in-promise.js:103:20)
at MemberExpression (/some/frontend_project/node_modules/eslint-plugin-jest/rules/valid-expect-in-promise.js:154:13)
at listeners.(anonymous function).forEach.listener (/some/frontend_project/node_modules/eslint/lib/util/safe-emitter.js:45:58)
at Array.forEach (<anonymous>)
at Object.emit (/some/frontend_project/node_modules/eslint/lib/util/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/some/frontend_project/node_modules/eslint/lib/util/node-event-generator.js:251:26)
error Command failed with exit code 2.
Everything works perfectly well for the other files.
Let me know if you need more information.
The text was updated successfully, but these errors were encountered:
MickaelBergem
changed the title
TypeError: Cannot read property 'type' of undefined
jest/no-test-callback` => TypeError: Cannot read property 'type' of undefined
Nov 2, 2018
MickaelBergem
changed the title
jest/no-test-callback` => TypeError: Cannot read property 'type' of undefined
jest/no-test-callback => TypeError: Cannot read property 'type' of undefined
Nov 2, 2018
It looks like eslint crashes on a specific file in my project:
Stacktrace:
Versions
Eslint config
yarn eslint --print-config server/poc.js
produces:I also extend
plugin:jest/recommended
andairbnb
.Everything works perfectly well for the other files.
Let me know if you need more information.
The text was updated successfully, but these errors were encountered: