Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

UnhandledPromiseRejectionWarning in completeQueueHandler #264

Open
cschwebk opened this issue Nov 15, 2018 · 0 comments
Open

UnhandledPromiseRejectionWarning in completeQueueHandler #264

cschwebk opened this issue Nov 15, 2018 · 0 comments

Comments

@cschwebk
Copy link

In the completeQueueHandler method of src/test_runner.js, an Unhandled Promise Rejection will be triggered if a reporter (such as magellan-xunit-reporter) does not return a promise out of the flush method. I suspect it will also be triggered if flush does not exist in the reporter. It looks like these checks were removed in #257.

(node:41618) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'then' of undefined
    at innerResolve (.../node_modules/testarmada-magellan/src/test_runner.js:196:21)
    at new Promise (<anonymous>)
    at Promise.all._.map.listener (.../node_modules/testarmada-magellan/src/test_runner.js:193:15)
    at arrayMap (.../node_modules/lodash/lodash.js:639:23)
    at Function.map (.../node_modules/lodash/lodash.js:9556:14)
    at Timeout.setTimeout [as _onTimeout] (.../node_modules/testarmada-magellan/src/test_runner.js:190:13)
    at ontimeout (timers.js:438:13)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:41618) 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(). (rejection id: 2)
(node:41618) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant