TypeError: Cannot read property 'result' of undefined at isAfterAll when I comment out all "it" blocks
See original GitHub issueWhat is the current behavior?
Jest in watch mode tries to parse results and fails with:
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:200
Unhandled error
console.error node_modules/jest-jasmine2/build/jasmine/Env.js:201
TypeError: Cannot read property 'result' of undefined
at isAfterAll (/home/capaj/git_projects/looop/project-alpha/back-end/node_modules/jest-jasmine2/build/jasmine/Suite.js:213:34)
at Suite.Object.<anonymous>.Suite.addExpectationResult (/home/capaj/git_projects/looop/project-alpha/back-end/node_modules/jest-jasmine2/build/jasmine/Suite.js:167:7)
at Env.fail (/home/capaj/git_projects/looop/project-alpha/back-end/node_modules/jest-jasmine2/build/jasmine/Env.js:522:25)
at next.fail (/home/capaj/git_projects/looop/project-alpha/back-end/node_modules/jest-jasmine2/build/queue_runner.js:47:22)
at <anonymous>
What is the expected behavior? Jest just logs something like:
No tests were run.
without breaking the watch mode and without throwing any errors.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system. I don’t think this depends on a version of any of those. I will be happy to post them if anyone requests.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:9
Top Results From Across the Web
Failed: Cannot read property 'results' of undefined
"var spec" is not being set to anything. That means "jasmine.getEnv().currentSpec" is not working for whatever reason.
Read more >karma-runner - Bountysource
Running single test gives: AfterAll TypeError cannot read property 'info' and 'error' of undefined $ 0. Created 2 years ago in karma-runner/karma-jasmine with...
Read more >an error was thrown in afterall typeerror: cannot read ...
TypeError : Cannot read properties of undefined (reading 'isDynamic') is obscuring any errors thrown in getServerSideProps , and possible anywhere in index.tsx ....
Read more >Basic Usage -- IM v6 Examples - ImageMagick
So the correct way to do this in IMv6 is to read the image, process and then use the final 'implicit write' argument...
Read more >Type Safe JavaScript with JSDoc - Medium
Instead we'll use it to check the types of our JavaScript code during code time using JSDocs comments and type inference. So there'll...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have got same error, it’s happen because I left empty instruction in x.test.js (“jest”: “^22.4.3”,)
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.