Test suite failed to run

Hi everyone,

When I run npm test -t db-connection, I get the following error:

FAIL test/db-connection.test.js
● Test suite failed to run

TypeError: Super expression must either be null or a function

  at _inherits (node_modules/@babel/runtime/helpers/inherits.js:5:11)
  at test/config/mongoEnvironment.js:30:29
  at Object.<anonymous> (test/config/mongoEnvironment.js:116:2)
  at Module._compile (node_modules/pirates/lib/index.js:136:24)
  at Object.newLoader (node_modules/pirates/lib/index.js:141:7)

I’ve been following the advice in Npm install error(fails) and ran the following:

rm package-lock.json
npm install --legacy-peer-deps

However, the tests are still failing. Any other ideas how to get the tests to work?

Thanks in advance.

Hi @Jennifer_Tibbenham, welcome to the community :wave: .
Are you getting the same error message even after you followed the Npm install error advice?

If you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,

1 Like