Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 如何在universal React/React Native项目中使用jest收集覆盖率_Reactjs_Typescript_React Native_Jestjs_Expo - Fatal编程技术网

Reactjs 如何在universal React/React Native项目中使用jest收集覆盖率

Reactjs 如何在universal React/React Native项目中使用jest收集覆盖率,reactjs,typescript,react-native,jestjs,expo,Reactjs,Typescript,React Native,Jestjs,Expo,我们正在为我们的react以及react本机组件使用跨平台实现。 一般来说,我们有以下结构: src ├── component1 │ ├── index.tsx │ └── index.spec.tsx ├── component2 │ ├── index.tsx │ ├── index.native.tsx │ ├── index.native.spec.tsx │ ├── index.web.spec.tsx 我们为本机和web运行两个不同的测试套件。从所有不包含

我们正在为我们的react以及react本机组件使用跨平台实现。 一般来说,我们有以下结构:

src
├── component1
│   ├── index.tsx
│   └── index.spec.tsx
├── component2
│   ├── index.tsx
│   ├── index.native.tsx
│   ├── index.native.spec.tsx
│   ├── index.web.spec.tsx
我们为本机和web运行两个不同的测试套件。从所有不包含.native扩展名的typescript文件中收集网络覆盖率。但是,当存在
index.native.tsx
文件时,如何配置jest将
index.tsx
文件从本机覆盖范围中排除

我是否必须使用
coveragePathIgnorePatterns
选项手动排除这些文件中的每一个,或者是否有办法使用
testMatch
进行排除

提前谢谢