PASS ../parser/test/flatten-user-flow-shortcuts.spec.ts
PASS ../parser/test/flow-spliterators.spec.ts
PASS ../parser/test/circles1.spec.js
PASS ../parser/test/circles.spec.ts
PASS ../parser/test/replace-basic-flows.spec.ts
PASS ../parser/test/multiple-flows-in-first-layer.spec.ts
PASS ../parser/test/multiple-layers.spec.ts
PASS ../parser/test/extends-basic-flows.spec.ts
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
jest.config.js
module.exports = {
testEnvironment: 'node',
modulePaths: resolveModulesPathsArray,
testRegex: [`./*.spec.js$`, `./*.spec.ts$`],
roots: [mainTestsFolderPath, srcPath],
transform: { '^.+\\.js$': jestTransformerFilePath, '^.+\\.ts$': jestTransformerFilePath },
testPathIgnorePatterns: [`coverage`, 'node_modules'],
setupFiles: [testPolyfillsFilePath],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
collectCoverage: true,
collectCoverageFrom: [`${srcPath}/*.{ts,tsx,js,jsx,json}`],
}
srcPath是我的src文件夹的绝对路径。
我确定我忘了配置一些东西。在运行"test": "react-scripts test --coverage",
时,我什至在一个新的create-react-app中检查了这一点,并且看到了相同的结果。
是什么原因造成的?