-
Notifications
You must be signed in to change notification settings - Fork 4
/
jest.config.js
35 lines (35 loc) · 956 Bytes
/
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
module.exports = {
testEnvironment: 'jsdom',
setupFiles: [
'<rootDir>/.jest/register-context.js'
],
setupFilesAfterEnv: [
'<rootDir>/.jest/before-after.js'
],
modulePaths: [
'/shared/vendor/modules'
],
moduleFileExtensions: [
'js',
'jsx',
'vue',
'test.js'
],
moduleDirectories: [
'node_modules',
'bower_components',
'shared',
'src/situations'
],
transform: {
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': '@vue/vue3-jest',
'\\.(mp3|mp4|png|jpg|jpeg|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileTransformer.js'
},
moduleNameMapper: {
i18next: '<rootDir>/__mocks__/i18nextMock.js',
'vue3-keypress': '<rootDir>/__mocks__/keypressMock.js',
'\\.(css|less|scss)$': '<rootDir>/__mocks__/styleMock.js',
'^(commun|controle|inventaire|maintenance|objets_trouves|prevention|tri)/(.*)$': '<rootDir>/src/situations/$1/$2'
}
};