Skip to content

Commit cd344fa

Browse files
authored
Merge pull request #112 from edgardmessias/exclude_test_coverage
Removed test folder from code coverage
2 parents bf133c1 + deeb7e7 commit cd344fa

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

coverconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"enabled": true,
44
"relativeSourcePath": "..",
55
"relativeCoverageDir": "../../coverage",
6-
"ignorePatterns": ["**/node_modules/**"],
6+
"ignorePatterns": ["**/node_modules/**", "test/**"],
77
"includePid": false,
88
"reports": ["json", "html", "lcov"],
99
"verbose": false

src/test/testUtil.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,13 @@ export function destroyPath(fullPath: string) {
135135
for (let file of files) {
136136
destroyPath(path.join(fullPath, file));
137137
}
138-
fs.rmdirSync(fullPath);
138+
139+
//Error in windows with anti-malware
140+
try {
141+
fs.rmdirSync(fullPath);
142+
} catch (error) {
143+
console.error(error);
144+
}
139145
return true;
140146
}
141147

0 commit comments

Comments
 (0)