2๐
โ
I think you should specify baseDir
to be able to use include\extends
with jest testing and include files in your tempaltes like include /HelloWorld.pug
.
And in jest config it should be:
'vue-jest': {
pug: {
baseDir: path.join(__dirname, 'my/folder/with/views');
}
},
P.S. Also your webpack configuration of pug-loader should be changed (I think root
property of pug-loader options).
๐คMax Sinev
0๐
You need to set vue-jest
params under global prop in jest config:
"jest": {
"globals": {
"vue-jest": {
"pug": {
"basedir": "./"
}
}
},
๐คArtemKha
Source:stackexchange.com