DEV Community

Fatima Aminu
Fatima Aminu

Posted on

Test coverage in nestjs (nodenext)

I have been trying to run a test coverage for a specific service using

npm test -- sweeps.service.spec.ts --coverage
Enter fullscreen mode Exit fullscreen mode

and so far, unsuccessful. The projects tsconfig is

{
  "compilerOptions": {
    "module": "nodenext",
    "moduleResolution": "nodenext",
    ...
  }
}
Enter fullscreen mode Exit fullscreen mode

error keeps saying:
'Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.'

Please How do I configure jest to support nodenext?

Top comments (0)