forked from vllm-project/guidellm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
30 lines (27 loc) · 1.05 KB
/
jest.config.cjs
File metadata and controls
30 lines (27 loc) · 1.05 KB
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
const path = require('path');
const nextJest = require('next/jest');
const createJestConfig = nextJest({
dir: path.resolve(__dirname, 'src/ui'),
});
const customJestConfig = {
collectCoverage: false,
collectCoverageFrom: ['./src/ui/**/*.{ts,tsx}'],
coverageDirectory: './coverage',
coverageProvider: 'v8',
coverageReporters: ['text-summary', 'lcov', 'json-summary'],
moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleNameMapper: {
'^.+\\.(svg)$': '<rootDir>/tests/ui/__mocks__/svg.js',
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/tests/ui/__mocks__/fileMock.js',
'\\.(css|less|scss|sass)$': '<rootDir>/tests/ui/__mocks__/styleMock.js',
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testEnvironment: 'jest-environment-jsdom',
testMatch: [
'<rootDir>/tests/ui/unit/**/*.(test|spec).{ts,tsx,js,jsx}',
'<rootDir>/tests/ui/integration/**/*.(test|spec).{ts,tsx,js,jsx}',
],
};
module.exports = createJestConfig(customJestConfig);