Skip to content

Commit

Permalink
Remove vue-jest, use ts-jest only
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarner committed Sep 4, 2021
1 parent b5ebe6c commit 756e88a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 467 deletions.
27 changes: 14 additions & 13 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig');

module.exports = {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^~/(.*)$': '<rootDir>/$1',
'^vue$': 'vue/dist/vue.common.js',
},
moduleFileExtensions: ['js', 'ts', 'vue', 'json'],
transform: {
'^.+\\.js$': 'babel-jest',
'^.+\\.ts?$': 'ts-jest',
'.*\\.(vue)$': 'vue-jest',
},
collectCoverage: false,
collectCoverageFrom: ['<rootDir>/components/**/*.vue', '<rootDir>/pages/**/*.vue'],
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src/', '<rootDir>/test/'],
testRegex: '\\.(spec|e2e-spec)\\.ts$',
testPathIgnorePatterns: ['/node_modules/'],
testTimeout: 20000,
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
coveragePathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/test/'],
coverageDirectory: '<rootDir>/test/.coverage',
reporters: ['default'],
};
Loading

0 comments on commit 756e88a

Please sign in to comment.