From 0be88e79cfaf82639ebac1ae06637eb5f65763a7 Mon Sep 17 00:00:00 2001 From: Andrew Finlay Date: Thu, 2 Jan 2020 15:37:49 +1100 Subject: [PATCH] feat: Add `baseline` switch to `nyc instrument` command --- index.js | 8 +++++++- tap-snapshots/test-test.js-TAP.test.js | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 288a06f..b420385 100644 --- a/index.js +++ b/index.js @@ -32,7 +32,7 @@ const tempDir = { default: './.nyc_output', nycAlias: 't', nycHiddenAlias: 'temp-directory', - nycCommands: [null, 'check-coverage', 'merge', 'report'] + nycCommands: [null, 'check-coverage', 'instrument', 'merge', 'report'] }; const testExclude = { @@ -342,6 +342,12 @@ const instrumentOnly = { type: 'boolean', default: false, nycCommands: nycCommands.instrumentOnly + }, + baseline: { + description: 'should nyc create a baseline coverage file?', + type: 'boolean', + default: false, + nycCommands: nycCommands.instrumentOnly } }; diff --git a/tap-snapshots/test-test.js-TAP.test.js b/tap-snapshots/test-test.js-TAP.test.js index 6d077b8..2eb0591 100644 --- a/tap-snapshots/test-test.js-TAP.test.js +++ b/tap-snapshots/test-test.js-TAP.test.js @@ -76,6 +76,7 @@ Object { "all": false, "autoWrap": true, "babelCache": false, + "baseline": false, "branches": 0, "cache": true, "checkCoverage": false,