allure-js
allure-js copied to clipboard
allure-jasmine setup with jest-jasmine2 runner hangs with error
Describe the bug I tried to setup allure-jasmine v3.0.4 with jest-jasmine2 v29.7.0 runner for my jest tests, and encountered an error which hangs jest.
console.error
Unhandled error
at process.uncaught (node_modules/jest-jasmine2/build/jasmine/Env.js:196:19)
console.error
TypeError: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:405:5)
at validateString (node:internal/validators:162:11)
at Object.isAbsolute (node:path:1156:5)
at isAbsolute (/Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/allure-js-commons/src/sdk/reporter/utils.ts:105:12)
at getPackageLabel (/Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/allure-js-commons/src/sdk/reporter/utils/labels.ts:49:25)
at /Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/allure-jasmine/src/index.ts:156:41
at ReporterRuntime.updateFunc (/Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/allure-js-commons/src/sdk/reporter/ReporterRuntime.ts:226:5)
at AllureJasmineReporter.updateTest [as specDone] (/Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/allure-jasmine/src/index.ts:147:24)
at dispatch (/Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.js:87:28)
at ReportDispatcher.specDone (/Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.js:63:11)
at Object.specResultCallback (/Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/jest-jasmine2/build/jasmine/Env.js:429:20)
at Spec.attr.resultCallback (/Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/jest-jasmine2/build/setup_jest_globals.js:60:26)
at complete (/Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/jest-jasmine2/build/jasmine/Spec.js:172:12)
at /Users/e.g.klimov/projects/allure-jasmine-bare/node_modules/jest-jasmine2/build/jasmine/Spec.js:169:32
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at process.uncaught (node_modules/jest-jasmine2/build/jasmine/Env.js:197:19)
To Reproduce Steps to reproduce the behavior:
- Clone repo https://github.com/eklmv/allure-jasmine-bare-bug
- Run
yarn && yarn jest
in it - See error in console
Expected behavior
Test successfully finished with report available in allure-results/jest
directory.
Additional context Minimal repo to reproduce that bug: https://github.com/eklmv/allure-jasmine-bare-bug