From deeb7e78abac166ff0a91857d54ac95c3b1c8a79 Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Mon, 22 Jan 2018 15:35:03 -0200 Subject: [PATCH] Removed test folder from code coverage --- coverconfig.json | 2 +- src/test/testUtil.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/coverconfig.json b/coverconfig.json index 901688fb..b54f09d5 100644 --- a/coverconfig.json +++ b/coverconfig.json @@ -3,7 +3,7 @@ "enabled": true, "relativeSourcePath": "..", "relativeCoverageDir": "../../coverage", - "ignorePatterns": ["**/node_modules/**"], + "ignorePatterns": ["**/node_modules/**", "test/**"], "includePid": false, "reports": ["json", "html", "lcov"], "verbose": false diff --git a/src/test/testUtil.ts b/src/test/testUtil.ts index ac2df641..30078a57 100644 --- a/src/test/testUtil.ts +++ b/src/test/testUtil.ts @@ -135,7 +135,13 @@ export function destroyPath(fullPath: string) { for (let file of files) { destroyPath(path.join(fullPath, file)); } - fs.rmdirSync(fullPath); + + //Error in windows with anti-malware + try { + fs.rmdirSync(fullPath); + } catch (error) { + console.error(error); + } return true; }