From 83e7d9b7d16c6378256e707e698e5e410841d5de Mon Sep 17 00:00:00 2001 From: chen_xi <276999030@qq.com> Date: Mon, 30 May 2022 10:37:13 +0800 Subject: [PATCH] cx20220530 --- test/unit/jest.conf.js | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/test/unit/jest.conf.js b/test/unit/jest.conf.js new file mode 100644 index 0000000..4f7da15 --- /dev/null +++ b/test/unit/jest.conf.js @@ -0,0 +1,30 @@ +const path = require('path') + +module.exports = { + rootDir: path.resolve(__dirname, '../../'), + moduleFileExtensions: [ + 'js', + 'json', + 'vue' + ], + moduleNameMapper: { + '^@/(.*)$': '<rootDir>/src/$1' + }, + transform: { + '^.+\\.js$': '<rootDir>/node_modules/babel-jest', + '.*\\.(vue)$': '<rootDir>/node_modules/vue-jest' + }, + testPathIgnorePatterns: [ + '<rootDir>/test/e2e' + ], + snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'], + setupFiles: ['<rootDir>/test/unit/setup'], + mapCoverage: true, + coverageDirectory: '<rootDir>/test/unit/coverage', + collectCoverageFrom: [ + 'src/**/*.{js,vue}', + '!src/main.js', + '!src/router/index.js', + '!**/node_modules/**' + ] +} -- Gitblit v1.8.0