This repository has been archived by the owner on Nov 30, 2024. It is now read-only.
forked from istanbuljs/nyc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 100% coverage (istanbuljs#1195)
- Loading branch information
1 parent
fd40d49
commit 2735ee2
Showing
17 changed files
with
174 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict' | ||
|
||
const isWindows = require('is-windows')() | ||
|
||
module.exports = { | ||
exclude: [ | ||
'coverage', | ||
'self-coverage', | ||
'test/fixtures/coverage.js', | ||
'test/build/*', | ||
'test/src/*', | ||
'test/nyc.js', | ||
'test/process-args.js', | ||
'test/fixtures/_generateCoverage.js' | ||
], | ||
/* Unknown why we don't get 100% coverage on Windows. */ | ||
'check-coverage': !isWindows, | ||
branches: 100, | ||
functions: 100, | ||
lines: 100, | ||
statements: 100 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict' | ||
const path = require('path') | ||
const vm = require('vm') | ||
|
||
vm.runInContext( | ||
'(() => 10)();', | ||
vm.createContext({}), | ||
path.resolve(__dirname, 'in-context.js') | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
'use strict' | ||
|
||
// This just blocks fixtures from seeing the root nyc.config.js | ||
module.exports = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"parser-plugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"nyc": { | ||
"parser-plugins": [ | ||
"v8intrinsic" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
function fn() {} | ||
%GetOptimizationStatus(fn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
|
||
const t = require('tap') | ||
|
||
const { runNYC } = require('./helpers') | ||
|
||
const cwd = path.resolve(__dirname, './fixtures/parser-plugins') | ||
|
||
t.test('parser plugin set', async t => { | ||
const { status, stdout, stderr } = await runNYC({ | ||
args: ['instrument', 'v8.js'], | ||
cwd | ||
}) | ||
t.strictEqual(status, 0) | ||
t.strictEqual(stderr, '') | ||
t.match(stdout, /function cov_/) | ||
}) | ||
|
||
t.test('parser plugin unset', async t => { | ||
const { status, stdout, stderr } = await runNYC({ | ||
args: ['instrument', '--nycrc-path=no-plugins.json', 'v8.js'], | ||
cwd | ||
}) | ||
t.strictEqual(status, 0) | ||
t.strictEqual(stderr, '') | ||
t.notMatch(stdout, /function cov_/) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters