A
A
Anton2019-04-01 18:35:03
JavaScript
Anton, 2019-04-01 18:35:03

Stylus mixins not working when running tests via jest in single file vue component?

Good day to all!
I'm trying to run the test, but it swears at the mixin, although var, for example, work out fine.
5ca22f4ebcec5381496877.png
jest config:

module.exports = {
  moduleNameMapper: {
    '^@/(.*)$': '<rootDir>/$1',
    '^~/(.*)$': '<rootDir>/$1',
    '^[email protected]/(.*)$': '<rootDir>/$1',
    '^vue$': 'vue/dist/vue.common.js',
  },
  moduleFileExtensions: ['js', 'vue', 'json'],
  transform: {
    '^.+\\.js$': 'babel-jest',
    '.*\\.(vue)$': 'vue-jest',
  },
};

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question