-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.browser.config.ts
31 lines (25 loc) · 1004 Bytes
/
jest.browser.config.ts
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
/********************************************************************************
* Copyright (C) 2023 Zhangyi
********************************************************************************/
import type { JestConfigWithTsJest } from 'ts-jest';
const config: JestConfigWithTsJest = {
// The glob patterns Jest uses to detect test files
testMatch: [
'<rootDir>/out/src/browser/**/*.test.js',
],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: [
'/node_modules/',
],
moduleNameMapper: {
// A css mock just to make jest work
'\\.css$': '<rootDir>/src/browser/test/jest-css.js',
},
preset: 'ts-jest/presets/js-with-ts',
transformIgnorePatterns: [
'node_modules/(?!(vscode-ws-jsonrpc)/).+\\.js$',
],
testEnvironment: 'jest-environment-jsdom',
setupFilesAfterEnv: ['<rootDir>/out/test/jest-setup.js'],
};
export default config;