From 4d63aa3a62c877958a0094e6a4e238bee1f05a96 Mon Sep 17 00:00:00 2001 From: Viktor Kovacs Date: Tue, 30 Mar 2021 18:52:58 +0200 Subject: [PATCH] Code coverage for test. --- .nycrc.json | 6 ++++++ appveyor.yml | 2 ++ package.json | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .nycrc.json diff --git a/.nycrc.json b/.nycrc.json new file mode 100644 index 0000000..d458682 --- /dev/null +++ b/.nycrc.json @@ -0,0 +1,6 @@ +{ + "exclude": [ + "*/external/*", + "*/viewer/*" + ] +} diff --git a/appveyor.yml b/appveyor.yml index 4717929..f39632f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,8 @@ build_script: test_script: - npm run test + - npm run coverage + - npm run codecov artifacts: - path: build\final\package\* diff --git a/package.json b/package.json index 76eac77..9da2e86 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,13 @@ "mocha": "^8.3.2", "rewire": "^5.0.0", "svgo": "^2.2.2", - "nyc": "^15.1.0" + "nyc": "^15.1.0", + "codecov": "^3.8.1" }, "scripts": { "test": "mocha test", - "coverage": "nyc mocha test", + "coverage": "nyc --reporter=lcov mocha test", + "codecov": "codecov", "build": "python tools/create_package.py", "update": "python tools/update_includes.py", "svg": "python tools/optimize_svg_files.py"