ryparker / jest-allure2

Jest reporter that produces Allure reports using the latest Allure features : ^2.0.0-beta.6
MIT License
3 stars 3 forks source link

All tests throw "Error: No active group" #95

Open oleksandr-maliarenko opened 3 years ago

oleksandr-maliarenko commented 3 years ago

Describe the bug All my tests throw 2 errors at a time, 1 is actual error of a test and the other is "No active group"

To Reproduce

  1. I added jest setup files as per your instructions
  2. I changed jest config by adding ./jest.setup.js to setupFilesAfterEnv
  3. I run tests as before using jest --runInBand --verbose=true ./test/e2e command
  4. I generate report using node_modules/.bin/allure generate ./allure-results -c && allure open

Actual result Tests are run correctly. Each tests has 2 results: 1 for the tests and 1 for the reporter. Results for the reporter are shown in Allure after report generation. That's not the information I want to see.

Expected result No errors from reporter upon run AND if there're reporter's errors they should be omitted for the reporter.

Desktop (please complete the following information):

Additional context Full error:

at JasmineAllureReporter.get currentGroup [as currentGroup] (path/node_modules/jest-allure2/src/reporter.ts:76:10) at path/node_modules/jest-allure2/src/reporter.ts:434:9 at Object. (path/node_modules/jest-allure2/src/reporter.ts:399:31) at path/node_modules/jest-jasmine2/build/queueRunner.js:45:12 at new Promise () at mapper (path/node_modules/jest-jasmine2/build/queueRunner.js:28:19) at path/node_modules/jest-jasmine2/build/queueRunner.js:75:41

Jest has this settings:

{ "testEnvironment": "node", "setupFilesAfterEnv": [ "/test/expect.js", "./jest.setup.js" ], "collectCoverage": true, "coverageReporters": [ "text", "text-summary" ], "collectCoverageFrom": [ "src//*.js", "!/node_modules/", "!*/config/.js", "!/*.mock.js", "!*/.json" ], "reporters": [ "default", [ "jest-junit", { "outputDirectory": "reports", "outputName": "unit.xml" } ] ] }

rossmasday commented 3 years ago

I had the same issue and bumped back to previous version (1.2.2) and it is ok now