forked from strapi/strapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.api.js
More file actions
39 lines (38 loc) · 1.01 KB
/
jest.config.api.js
File metadata and controls
39 lines (38 loc) · 1.01 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
31
32
33
34
35
36
37
38
39
'use strict';
module.exports = {
displayName: 'API integration tests',
testMatch: ['**/?(*.)+(spec|test).api.(js|ts)'],
testEnvironment: 'node',
setupFilesAfterEnv: ['<rootDir>/tests/setup/jest-api.setup.js'],
// Coverage configuration for SonarQube
collectCoverage: false, // Will be enabled via CLI flag
collectCoverageFrom: [
'**/*.{js,ts}',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/dist/**',
'!**/coverage/**',
'!**/*.config.{js,ts,mjs}',
'!**/jest*.{js,ts}',
'!**/test/**',
'!**/tests/**',
'!**/__tests__/**',
'!**/*.test.{js,ts}',
'!**/*.spec.{js,ts}',
],
coverageDirectory: '<rootDir>/coverage',
coverageReporters: ['text', 'lcov', 'html'],
coveragePathIgnorePatterns: [
'<rootDir>/dist/',
'<rootDir>/node_modules/',
'<rootDir>/out-tsc/',
'<rootDir>/test/',
'<rootDir>/tests/',
'<rootDir>/__tests__/',
'<rootDir>/coverage/',
],
transform: {
'^.+\\.ts$': ['@swc/jest'],
},
modulePathIgnorePatterns: ['.cache'],
};