forked from grafana/pyroscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
27 lines (26 loc) · 1.03 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
const path = require('path');
module.exports = {
// TypeScript files (.ts, .tsx) will be transformed by ts-jest to CommonJS syntax, and JavaScript files (.js, jsx) will be transformed by babel-jest.
testEnvironment: 'jsdom',
setupFilesAfterEnv: [path.join(__dirname, 'setupAfterEnv.ts')],
testMatch: [
'**/__tests__/**/*.+(ts|tsx|js)',
'**/?(*.)+(spec|test).+(ts|tsx|js)',
],
moduleNameMapper: {
'@webapp(.*)$': path.join(__dirname, 'webapp/javascript/$1'),
},
transform: {
'\\.module\\.(css|scss)$': 'jest-css-modules-transform',
'\\.(css|scss)$': 'jest-css-modules-transform',
'\\.svg$': path.join(__dirname, 'svg-transform.js'),
'^.+\\.(t|j)sx?$': ['@swc/jest'],
},
transformIgnorePatterns: [
// force us to not transpile these dependencies
// https://stackoverflow.com/a/69150188
'node_modules/(?!(true-myth|d3|d3-array|internmap|d3-scale|react-notifications-component|graphviz-react))',
],
globalSetup: '<rootDir>/globalSetup.js',
globalTeardown: '<rootDir>/globalTeardown.js',
};