Deprecation warning and error message when running tests
brazabr opened this issue · 1 comments
brazabr commented
When I run the example tests I get the following errors on screen:
Got this error in two machines:
- Linux Ubuntu 16.04 (from within Windows 10) x64 with NodeJS v8.11.2
- Mac OS X High Sierra with NodeJS v8.11.2
[Fri Jul 06 2018 21:42:45 GMT+0000 (UTC)] ERROR cucumber integration has failed code is not defined
(node:1295) UnhandledPromiseRejectionWarning: ReferenceError: code is not defined
at exitNow (/mnt/c/Users/braza/Code/klassi-cucumber-js/index.js:205:22)
at /mnt/c/Users/braza/Code/klassi-cucumber-js/index.js:208:9
at new Promise (<anonymous>)
at Object.<anonymous> (/mnt/c/Users/braza/Code/klassi-cucumber-js/index.js:200:8)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
(node:1295) 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: 1)
(node:1295) [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.
(node:1295) UnhandledPromiseRejectionWarning: ReferenceError: code is not defined
at exitNow (/mnt/c/Users/braza/Code/klassi-cucumber-js/index.js:205:22)
at /mnt/c/Users/braza/Code/klassi-cucumber-js/index.js:208:9
at new Promise (<anonymous>)
at Object.<anonymous> (/mnt/c/Users/braza/Code/klassi-cucumber-js/index.js:200:8)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
(node:1295) 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)
larryg01 commented
that was an oversight thanks for the bug report
the fix added
log = require('./runtime/logger')