Skip to content

Commit

Permalink
chore: Suppress coverage for onExit callback (#1147)
Browse files Browse the repository at this point in the history
The callback is run but we're unable to record coverage for it.
  • Loading branch information
coreyfarrell authored Jul 16, 2019
1 parent 7943413 commit dcf4bbd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,11 @@ class NYC {
_wrapExit () {
// we always want to write coverage
// regardless of how the process exits.
onExit(() => {
this.writeCoverageFile()
}, { alwaysLast: true })
onExit(
/* istanbul ignore next: the callback is run but coverage is not recorded */
() => this.writeCoverageFile(),
{ alwaysLast: true }
)
}

wrap (bin) {
Expand Down

0 comments on commit dcf4bbd

Please sign in to comment.