jeudi 11 février 2021

Cannot run jest in pre commit hook

I was trying to setup pre commit hooks in our project but the jest tests don't seem to work. We use storybook for testing our react components. This is what i get when i try to run the pre commit hook.

` Could not locate module @/graphql/types mapped as: C:\Users\pathToSrc\src\graphql/types.

Please check your configuration for these entries: { "moduleNameMapper": { "/@/(.*)$/": "C:\Users\pathToSrc\src$1" }, "resolver": null } `

Here is what i get in the console

Here's a snippet of the package.json with commands

Here is jest.config.js

Aucun commentaire:

Enregistrer un commentaire