-
Notifications
You must be signed in to change notification settings - Fork 124
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
"ReferenceError: jasmine is not defined" when following instructions to use allure-js with Jest #447
Comments
I discovered folks having the same error in another jest reporter package, zaqqaz/jest-allure#8 (comment) and they said the test runner was the problem. I changed to jasmine2 as suggested in the comments, and then the report generated. But from what I can tell, the setup in your README for allure-js for Jest doesn't seem to be using allure-js at all. According to the README, I had to install allure-jasmine and allure-js-commons, and I've observed I'm able to remove allure-js and the report still generates. Is allure-js involved in this at all, or is this project just showing instructions to configure the allure reporter for other npm modules which are deprecated? I also discovered the report left out a lot of failed suites due to execution errors in the tests. I'm not sure if I'm using the right reporter or an outdated one, and I don't want to setup a new project with deprecated tech. I can see in the allure-framework GitHub organization that allure-jasmine is deprecated, but the instructions in the README say to import allure-jasmine. I'll wait for an update from you, and then I'll give it a try again. Please let me know if you need any more clarifiction. Thank you. |
a while ago ( https://jestjs.io/blog/2021/05/25/jest-27 ) Jest switched the defaults and now uses We expect official support for circus runner to be landed later this year (our team already selected it for dev, issue #282) So at the moment there are 2 options available:
|
Duplicate of #282 |
Describe the bug
After following the instructions to use allure-js with Jest, I get the following error message when trying to run jest:
It says jasmine is not defined. I did attempt to instantiate jasmine with:
But then the test runner is not able to find any of the tests in the spec files.
To Reproduce
Steps to reproduce the behavior:
setupFilesAfterEnv: ["<rootDir>/path/to/allure-report.js"]
to the jest.config.js file.NODE_OPTIONS=--experimental-vm-modules npx jest
Expected behavior
I expected the tests to run and for an allure-results folder to be generated with test results. Instead, we get the error that jasmine is not found or in cases where I tried to load jasmine, no tests found.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: