From 545fa61cba82ec545c37612a9f9ff4251b98e2db Mon Sep 17 00:00:00 2001
From: Perreal Guillaume <guillaume.perreal@irstea.fr>
Date: Mon, 16 Sep 2019 11:32:19 +0200
Subject: [PATCH] Added code coverage.

---
 .gitignore    | 2 ++
 karma.conf.js | 2 +-
 package.json  | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index b0a5c34..48fff93 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
 /node_modules/
 /dist/
+/coverage/
+/.idea/
diff --git a/karma.conf.js b/karma.conf.js
index 175280d..a262746 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -16,7 +16,7 @@ module.exports = function (config) {
       clearContext: false // leave Jasmine Spec Runner output visible in browser
     },
     coverageIstanbulReporter: {
-      dir: require('path').join(__dirname, '../../coverage/error-types'),
+      dir: __dirname + '/coverage/error-types',
       reports: ['html', 'lcovonly', 'text-summary'],
       fixWebpackSourcePaths: true
     },
diff --git a/package.json b/package.json
index 5d717e4..dc03345 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
   },
   "scripts": {
     "build": "ng build",
-    "test": "ng test",
+    "test": "ng test --code-coverage --no-watch --no-progress",
     "lint": "ng lint",
     "package": "ng-packagr"
   },
-- 
GitLab