I have an unhandled promise rejection warning when trying to run repl

Hint: hit control+c anytime to enter REPL.
(node:289) UnhandledPromiseRejectionWarning: Error: describe with no children (describe() or it())
at Env.describe (/home/runner/UnitTestingStudio-10/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2172:15)
at describe (/home/runner/UnitTestingStudio-10/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:8256:18)
at Object. (/home/runner/UnitTestingStudio-10/spec/launchcode.spec.js:4:1)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at ModuleWrap. (internal/modules/esm/translators.js:195:29)
at ModuleJob.run (internal/modules/esm/module_job.js:145:37)
(node:289) 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 Command-line API | Node.js v19.6.0 Documentation). (rejection id: 2)
(node:289) [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.

Hello @caitlinaliflynn , welcome to the forums :smile:
It would really help to find the error if you provided a link to you repl.

But from what I can see in that error, it looks like you are using an async function that returns a promise. And it looks like the promise returned an error, but you didn’t have a catch function to handle it.

3 Likes