From cc8d4aacf83390228d939b6442aa3cd86f517916 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 14 Mar 2020 21:12:26 -0400 Subject: [PATCH] Tweak `nyc` setup. * Add `.nycrc.json` to configure includes/excludes * Add `text` and `lcov` reporter to `test:cover` `package.json` script * Ensure `yarn test:cover` evaluates all files (passing `--all` flag to `nyc`) --- .nycrc.json | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .nycrc.json diff --git a/.nycrc.json b/.nycrc.json new file mode 100644 index 0000000000..7cef8daac3 --- /dev/null +++ b/.nycrc.json @@ -0,0 +1,11 @@ +{ + "include": [ + "bin/**/*.js", + "lib/**/*.js", + "blueprints/**/*.js" + ], + + "exclude": [ + "blueprints/*/files/**" + ] +} diff --git a/package.json b/package.json index 341a20150c..046f5549a0 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "prepack": "yarn docs", "test": "node --unhandled-rejections=strict tests/runner", "test:all": "node --unhandled-rejections=strict tests/runner all", - "test:cover": "nyc node tests/runner all", + "test:cover": "nyc --all --reporter=text --reporter=lcov node tests/runner all", "test:slow": "node --unhandled-rejections=strict tests/runner slow", "test:debug": "node --unhandled-rejections=strict debug tests/runner" },