-
Notifications
You must be signed in to change notification settings - Fork 176
Description
Support plan
- is this issue currently blocking your project? (yes/no): yes
- is this issue affecting a production system? (yes/no):
Context
- node version: 14.5.0
- module version: 25.0.1
- environment (e.g. node, browser, native): node
- used with (e.g. hapi application, another framework, standalone, ...): Hapi
- any other relevant information: Issue happens in azure pipelines
How can we help?
we are using hapi/lab version 24.0.0 and when we are trying to run the unit test coverage in windows laptop it was throwing following error and not generating html to see the coverage report. hence we updated version to 25.0.1 which worked fine in windows and mac, we were able to see the coverage reports html file. But it started failing in azure pipelines like shown in below snippet. Hence we are blocked and unable to progress on unit test cases. Any help would be highly appreciated.
Windows error:
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of null at C:\project\node_modules@hapi\lab\lib\reporters\html.js:143:76 at Array.map () at module.exports.internals.Reporter.internals.Reporter.end (C:\project\node_modules@hapi\lab\lib\reporters\html.js:132:61) at module.exports.internals.Reporter.reporter.finalize (C:\project\node_modules@hapi\lab\lib\reporters\index.js:93:28) at module.exports.internals.Reporter.internals.Reporter.finalize (C:\project\node_modules@hapi\lab\lib\reporters\multiple.js:78:65) at processTicksAndRejections (internal/process/task_queues.js:93:5) at main (C:\project\node_modules@hapi\lab\bin\lab:56:20) (node:5732) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 95)
We also added "@hapi/eslint-plugin" as well.
UnhandledPromiseRejectionWarning: /home/vsts/work/1/s/runner/node_modules/@hapi/lab/lib/cli.js:163
if (pkg.lab?._root) {
^
SyntaxError: Unexpected token '.'Kindly please let me know if is there any resolution for this? thanks