Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .taprc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"test-ignore": "^test/(helpers|src)/",
"coverage": false,
"jobs": 1,
"timeout": 360,
"bail": false
}
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ node_js:
- "node"
- 10
- 8
- 6
matrix:
## An ENOMEM error occurs with 10+ under Travis-CI for Windows.
## Disable until we can determine the cause.
Expand Down
7 changes: 5 additions & 2 deletions bin/wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ if (process.env.NYC_PROCESSINFO_EXTERNAL_ID) {
}

if (process.env.NYC_CONFIG_OVERRIDE) {
var override = JSON.parse(process.env.NYC_CONFIG_OVERRIDE)
config = Object.assign(config, override)
const override = JSON.parse(process.env.NYC_CONFIG_OVERRIDE)
config = {
...config,
...override
}
process.env.NYC_CONFIG = JSON.stringify(config)
}

Expand Down
16 changes: 7 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,20 +393,18 @@ class NYC {
}

report () {
var tree
var map = this.getCoverageMapFromAllCoverageFiles()
var context = libReport.createContext({
const context = libReport.createContext({
dir: this.reportDirectory(),
watermarks: this.config.watermarks
watermarks: this.config.watermarks,
coverageMap: this.getCoverageMapFromAllCoverageFiles()
})

tree = libReport.summarizers.pkg(map)

this.reporter.forEach((_reporter) => {
tree.visit(reports.create(_reporter, {
reports.create(_reporter, {
skipEmpty: this.config.skipEmpty,
skipFull: this.config.skipFull
}), context)
skipFull: this.config.skipFull,
maxCols: process.stdout.columns || 100
}).execute(context)
})

if (this._showProcessTree) {
Expand Down
7 changes: 4 additions & 3 deletions lib/instrumenters/istanbul.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ function InstrumenterIstanbul (options) {
const { plugins } = options
const configPlugins = plugins ? { plugins } : {}

const instrumenter = createInstrumenter(Object.assign({
const instrumenter = createInstrumenter({
autoWrap: true,
coverageVariable: '__coverage__',
embedSource: true,
compact: options.compact,
preserveComments: options.preserveComments,
produceSourceMap: options.produceSourceMap,
ignoreClassMethods: options.ignoreClassMethods,
esModules: options.esModules
}, configPlugins))
esModules: options.esModules,
...configPlugins
})

return {
instrumentSync (code, filename, sourceMap) {
Expand Down
Loading