diff --git a/test/jest.config.js b/test/jest.config.js index 4d76006d..c9aa670d 100644 --- a/test/jest.config.js +++ b/test/jest.config.js @@ -1,20 +1,23 @@ // https://github.com/facebook/jest/tree/master/packages/babel-jest // TODO remove 'babel-core@^7.0.0-0' when babel-jest can work with '@babel/core' +const path = require('path') + module.exports = { + rootDir: path.resolve(__dirname, '..'), verbose: true, moduleFileExtensions: [ 'js', 'vue' ], moduleNameMapper: { - '^@/(.*)$': '/../lib/$1' + '^@/(.*)$': '/lib/$1' }, transform: { - '^.+\\.js$': '/../node_modules/babel-jest', - '.*\\.(vue)$': '/../node_modules/vue-jest' + '^.+\\.js$': '/node_modules/babel-jest', + '.*\\.(vue)$': '/node_modules/vue-jest' }, snapshotSerializers: [ - '/../node_modules/jest-serializer-vue' + '/node_modules/jest-serializer-vue' ] }