kafka-ui/kafka-ui-react-app/jest.config.ts
Oleg Shur 1b71ccb975
Migrate React app to Vite (#2153)
* Ejected CRA

* Cleanup

* jest

* Cleanup

* refactor cluster widgets

* configure build

* configure build

* configure coverage

* Experiment with lazy

* add ace to vendor

* Cleanup
2022-06-15 16:59:02 +03:00

32 lines
964 B
TypeScript

import type { Config } from '@jest/types';
export default {
roots: ['<rootDir>/src'],
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!src/**/*.d.ts'],
coveragePathIgnorePatterns: [
'/node_modules/',
'<rootDir>/src/generated-sources/',
'<rootDir>/vite.config.ts',
'<rootDir>/src/index.tsx',
'<rootDir>/src/serviceWorker.ts',
],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
testMatch: [
'<rootDir>/src/**/__{test,tests}__/**/*.{spec,test}.{js,jsx,ts,tsx}',
],
testEnvironment: 'jsdom',
transform: {
'\\.[jt]sx?$': 'babel-jest',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
},
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$',
'^.+\\.module\\.(css|sass|scss)$',
],
modulePaths: ['<rootDir>/src'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
resetMocks: true,
} as Config.InitialOptions;