forked from cloudblue/extension-xv-datalake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
66 lines (50 loc) · 1.48 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
55
56
57
58
59
60
61
62
63
64
65
66
/*
Copyright (c) 2023, Ingram Micro - Rahul Mondal
All rights reserved.
*/
module.exports = {
moduleFileExtensions: [
'js',
'vue',
],
clearMocks: true,
transform: {
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': '@vue/vue3-jest',
},
transformIgnorePatterns: [
'<rootDir>/node_modules/',
],
testMatch: [
'<rootDir>/ui/tests(**/*\\.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx))',
],
collectCoverage: true,
collectCoverageFrom: [
'ui/src/**/*.{js,vue}',
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/ui/src/$1',
// '^@cloudblueconnect/(.*)$': '<rootDir>/emptyModuleMock.js',
// '^@cloudblueconnect/(.*)$': '<rootDir>/node_modules/@cloudblueconnect/material-svg/$1',
'^~components/(.*)$': '<rootDir>/ui/src/components/$1',
'^~scripts/(.*)$': '<rootDir>/ui/src/scripts/$1',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
},
coverageDirectory: '<rootDir>/ui/tests/coverage/',
coveragePathIgnorePatterns: [
'<rootDir>/ui/pages/',
'<rootDir>/ui/src/images/',
'<rootDir>/ui/src/styles/',
'<rootDir>/node_modules/',
],
testEnvironment: 'jsdom',
testEnvironmentOptions: {
url: 'http://localhost/',
},
coverageProvider: 'v8',
setupFiles: [
'<rootDir>/globalMocks.js',
],
};