我正在使用 jest 进行集成测试,其中一个文件夹下有 20 个测试文件。我需要确保在运行测试时不需要执行该文件夹中的三个文件。我尝试使用testPathIgnorePatterns但它仅适用于文件夹而不适用于文件。怎么做?
笑话配置.js
/**
* @file Jest Integration Test Configuration File
*/
module.exports = {
roots: ['../../tests'],
testRegex: '_*_integration.test.(js|ts|tsx)?$',
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
moduleFileExtensions: ['ts', 'js'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
testPathIgnorePatterns: ['tests/api/modules/m3/sample.test.ts'],
testEnvironment: 'node',
reporters: [
'default',
[
'../../node_modules/jest-html-reporter',
{
pageTitle: 'Integration Test Report',
outputPath: 'tests/reports/integration-test-report.html',
includeFailureMsg: true,
},
],
],
};
皈依舞
繁花不似锦
米琪卡哇伊
相关分类