-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathjest.config.js
More file actions
24 lines (23 loc) · 852 Bytes
/
jest.config.js
File metadata and controls
24 lines (23 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const packagesToTranspile = [
'lodash-es',
'emoji-datasource-apple',
'@aeternity/hd-wallet',
'register-service-worker',
];
module.exports = {
testEnvironment: 'jsdom',
setupFiles: ['jest-canvas-mock', '<rootDir>/config/jest/globals.js'],
moduleFileExtensions: ['js', 'mjs', 'jsx', 'json', 'vue'],
transform: {
'^.+\\.vue$': '@vue/vue2-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|svg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.m?jsx?$': 'babel-jest',
},
transformIgnorePatterns: [`node_modules/(?!(${packagesToTranspile.join('|')})/)`],
moduleNameMapper: {
'^.*\\.svg\\?icon-component$': '<rootDir>/config/jest/EmptySvg.vue',
},
snapshotSerializers: ['jest-serializer-vue'],
testMatch: ['**/tests/unit/**/*.spec.(js|jsx|ts|tsx)', '**/__tests__/*.(js|jsx|ts|tsx)'],
testURL: 'http://localhost/',
};