[Vuejs]-Vue + Mocha, 0 test passing if vue singlefile has <style> tag

0👍

Could you provide your test config?
I had a similar issue, which was caused by the wrong configuration. In dev/prod env, styles were loaded by ruby gem, but the whole test env is run by node. So in test config, I had to add loaders for css:

environment.loaders.prepend('css', {
  test: /\.css$/,
  use: [
    'vue-style-loader',
    'css-loader',
    'sass-loader',
  ],
});

Leave a comment