forked from MyEtherWallet/MyEtherWallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
46 lines (46 loc) · 1.57 KB
/
jest.config.js
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
35
36
37
38
39
40
41
42
43
44
45
46
module.exports = {
collectCoverage: true, //process.env.NODE_ENV === 'production' ? true : false,
globals: {
WITH_NETWORK: false,
VERSION: 'test',
NODE_ENV: 'test',
ROUTER_MODE: 'hash',
BUILD_TYPE: 'web'
},
collectCoverageFrom: ['src/**/*.{js,vue}'],
coveragePathIgnorePatterns: [
'.*index.js$',
'src/components/FaqContents/.*',
'src/wallets/hardware/.*',
'src/networks/.*'
],
coverageDirectory: '<rootDir>/tests/unit/coverage',
moduleFileExtensions: ['js', 'jsx', 'json', 'vue', 'node', 'svg'],
reporters: ['default', 'jest-skipped-reporter'],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/networks$': '<rootDir>/tests/unit/__mocks__/networksMock.js',
'^@/(.*)$': '<rootDir>/src/$1',
'^@@/(.*)$': '<rootDir>/tests/unit/$1',
'^@/tests$': '<rootDir>/tests/index.js',
'^@/tests/(.*)$': '<rootDir>/tests/$1',
'\\.worker.js': '<rootDir>/tests/unit/__mocks__/workerMock.js',
'\\.md': '<rootDir>/tests/unit/__mocks__/mdMockup.js'
},
transformIgnorePatterns: [
'node_modules/(?!(vue-router|bootstrap|register-service-worker|vue-tel-input))'
],
moduleDirectories: ['node_modules'],
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
testEnvironmentOptions: {},
testURL: 'http://localhost/',
setupTestFrameworkScriptFile: '<rootDir>/tests/unit/__mocks__/mocks.js'
};