diff options
author | Marco Ambrosini <marcoambrosini@icloud.com> | 2022-09-12 13:25:20 +0200 |
---|---|---|
committer | Marco Ambrosini <marcoambrosini@icloud.com> | 2022-09-12 17:21:12 +0200 |
commit | e7853c59a7eed5228c204727927411d1ba82167a (patch) | |
tree | 22e7f14e9d0dd8d532177c6c80dae7aa5fd156fd /jest.config.js | |
parent | 33a60fcf662a12b63e147f8a485c68c73acb41f9 (diff) |
Use jest instead of @vue/cli-plugin-jest
Signed-off-by: Marco Ambrosini <marcoambrosini@icloud.com>
Diffstat (limited to 'jest.config.js')
-rw-r--r-- | jest.config.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/jest.config.js b/jest.config.js index 9aa23e823..418d60d63 100644 --- a/jest.config.js +++ b/jest.config.js @@ -35,11 +35,12 @@ const ignorePatterns = [ ] module.exports = { - preset: '@vue/cli-plugin-unit-jest/presets/no-babel', + // Allow tests in the src and in tests/unit folders testMatch: ['<rootDir>/src/**/*.(spec|test).(ts|js)'], transformIgnorePatterns: [ 'node_modules/(?!(' + ignorePatterns.join('|') + ')/)', + '/node_modules/(?!vue-material-design-icons|uuid)', ], resetMocks: false, setupFiles: ['jest-localstorage-mock'], @@ -50,9 +51,18 @@ module.exports = { collectCoverageFrom: [ '<rootDir>/src/**/*.{js,vue}', ], + + testEnvironment: 'jest-environment-jsdom', + + moduleFileExtensions: [ + 'js', + 'vue', + ], + transform: { // process `*.js` files with `babel-jest` '.*\\.(js)$': 'babel-jest', + '^.+\\.vue$': '@vue/vue2-jest', 'src/utils/media/effects/virtual-background/vendor/*': 'jest-transform-stub', }, } |