Open
Description
Hi, I'm having some trouble with processing vue files from npm package dependencies. Am I doing something wrong?
My current package.json
config:
"jest": {
"moduleFileExtensions": [ "js", "vue" ],
"moduleNameMapper": {
"^@(.*)$": "<rootDir>/src$1"
},
"testRegex": "jest\/.*",
"transform": {
"^.+\\.js$": "babel-jest",
"^.+\\.vue$": "jest-vue-preprocessor"
}
}
In my test, I have an import like this:
import Octicon from 'vue-octicon/components/Octicon.vue';
import 'vue-octicon/icons/x';
Vue.component('octicon', Octicon);
And when I run my tests, it complains about:
node_modules/vue-octicon/components/Octicon.vue:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){<template>
^
SyntaxError: Unexpected token <
at transformAndBuildScript (node_modules/jest-runtime/build/transform.js:320:12)
at Object.<anonymous> (test/jest/components/CartRow.test.js:3:16)