vuejs / vue-jest

Jest Vue transformer
MIT License
746 stars 157 forks source link

v.27.0.0-alpha.2 - "Module vue-jest in the transform option was not found" #382

Closed michealroberts closed 3 years ago

michealroberts commented 3 years ago

I've upgraded to the new version of this testing library (v.27.0.0-aplha.2) - but I am seeing the following Validation Error when running npm run test:unit:

Validation Error:

  Module vue-jest in the transform option was not found.
         <rootDir> is: /...

  Configuration Documentation:
  https://jestjs.io/docs/configuration.html

Yet in my jest.config.json I have the following configuration:

module.exports = {
  collectCoverageFrom: [
    "**/*.{js,ts,vue}", 
    "!**/node_modules/**"
  ],
  preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
  transform: {
    '^.+\\.vue$': 'vue-jest'
  },
  testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
  verbose: true
}

Any pro-tips or anything I have missed would be greatly appreciated!

Thank you...

N.B. Please let me know if you would like any more information ...