forked from ergonode/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
54 lines (53 loc) · 1.58 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
47
48
49
50
51
52
53
54
/*
* Copyright © Ergonode Sp. z o.o. All rights reserved.
* See LICENSE for license details.
*/
module.exports = {
verbose: true,
testEnvironment: 'jsdom',
moduleFileExtensions: [
'js',
'jsx',
'json',
'vue',
],
snapshotSerializers: [
'jest-serializer-vue',
],
moduleNameMapper: {
'^~/(.*)$': '<rootDir>/$1',
'@UI/(.*)$': '<rootDir>/modules/@ergonode/ui/src/$1',
'@Core/(.*)$': '<rootDir>/modules/@ergonode/core/src/$1',
'@Authentication/(.*)$': '<rootDir>/modules/@ergonode/core/src/$1',
'@Templates/(.*)$': '<rootDir>/modules/@ergonode/product-templates/src/$1',
'@Attributes/(.*)$': '<rootDir>/modules/@ergonode/attributes/src/$1',
'@Notifications/(.*)$': '<rootDir>/modules/@ergonode/notifications/src/$1',
'@Workflow/(.*)$': '<rootDir>/modules/@ergonode/workflow/src/$1',
},
transform: {
'^.+\\.(js|jsx)?$': 'babel-jest',
'^.+\\.(vue)$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|png|svg|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
},
transformIgnorePatterns: [
'node_modules/',
],
testMatch: [
'**/(__tests__|tests)/**/*.test.(js|jsx|ts|tsx)',
],
modulePathIgnorePatterns: [
'<rootDir>/.*/__mocks__',
],
testURL: 'http://localhost/',
reporters: [
'default',
[
'jest-junit',
{
suiteName: 'jest tests',
outputDirectory: 'build',
outputName: './jest-junit.xml',
},
],
],
};