-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathjest.config.cjs
More file actions
34 lines (33 loc) · 908 Bytes
/
jest.config.cjs
File metadata and controls
34 lines (33 loc) · 908 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 esModules = [
'@lukso/lsp-smart-contracts',
'@lukso/lsp-factory.js',
'@web3-onboard',
'nanoid',
'@lukso/web3-onboard-config',
'@tsndr/cloudflare-worker-jwt',
].join('|')
module.exports = {
transform: {
'^.+\\.vue$': '@vue/vue3-jest',
'^.+\\.(t|j)sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.json' }],
},
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.json', // Use your tsconfig.json
},
},
setupFilesAfterEnv: ['<rootDir>/tests/setup-env.ts'],
transformIgnorePatterns: [`/node_modules/(?!(${esModules}))`],
testEnvironment: 'jsdom',
moduleFileExtensions: ['js', 'ts', 'json', 'vue'],
moduleNameMapper: {
'@/(.*)$': '<rootDir>/src/$1',
},
modulePaths: ['<rootDir>'],
verbose: true,
testEnvironmentOptions: {
customExportConditions: ['node', 'node-addons'],
},
globalSetup: './jest.setup.cjs',
testTimeout: 10000,
}