Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module <rootDir>/node_modules/vue-jest in the transform option was not found

I got an error and I need your help. Thank for watching this question.

My situation: I am configuring Drone CI tool for my project and I get this when I run unit test on drone.yml.

Validation Error:

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

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

Here is my jest.conf.js

transform: {
    "^.+\\.js$": "babel-jest",
    ".*\\.vue$": "<rootDir>/node_modules/vue-jest"
  },

What I have tried:

  1. Remove <rootDir>/node_modules/. But I got an another error Module vue-jest in the transform option was not found.. So I think it is not the right solution
like image 913
Tran Son Hoang Avatar asked Dec 25 '18 08:12

Tran Son Hoang


1 Answers

npm install --save-dev vue-jest

and rerun your test

like image 79
Artsiom Lamaka Avatar answered Nov 11 '22 18:11

Artsiom Lamaka