forked from superhero-com/superhero-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
34 lines (33 loc) · 874 Bytes
/
jest.config.js
File metadata and controls
34 lines (33 loc) · 874 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
25
26
27
28
29
30
31
32
33
34
const packagesToTranspile = [
'lodash-es',
'vee-validate',
'@ionic/core',
'@ionic/vue',
'@stencil/core',
'ionicons',
'swiper',
];
module.exports = {
preset: '@vue/cli-plugin-unit-jest',
moduleFileExtensions: [
'js', 'mjs', 'cjs', 'jsx', 'ts', 'tsx', 'json', 'node',
],
transformIgnorePatterns: [
`node_modules/(?!(${packagesToTranspile.join('|')})/)`,
],
moduleNameMapper: {
'^.*\\.svg\\?vue-component$': '<rootDir>/config/jest/EmptySvg.vue',
'\\.(css|scss)$': 'identity-obj-proxy',
'@ledgerhq/devices/hid-framing':
'<rootDir>/node_modules/@ledgerhq/devices/lib/hid-framing',
},
setupFiles: [
'<rootDir>/config/jest/setEnvVars.js',
'<rootDir>/src/protocols/registerAdapters.ts',
],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\.vue$': '@vue/vue3-jest',
'^.+\\.mjs$': 'babel-jest',
},
};