Skip to content

Commit

Permalink
chore: Update standard to v14.3.1 (#1250)
Browse files Browse the repository at this point in the history
Also ignore the "tap-snapshots" folder.
  • Loading branch information
XhmikosR authored and coreyfarrell committed Dec 27, 2019
1 parent 676ca86 commit 8b4a148
Show file tree
Hide file tree
Showing 6 changed files with 391 additions and 403 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -38,7 +38,7 @@ if (/self-coverage/.test(__dirname)) {
function coverageFinder () {
var coverage = global.__coverage__
if (typeof __coverage__ === 'object') coverage = __coverage__
if (!coverage) coverage = global['__coverage__'] = {}
if (!coverage) coverage = global.__coverage__ = {}
return coverage
}

Expand Down
4 changes: 2 additions & 2 deletions lib/commands/instrument.js
Expand Up @@ -21,15 +21,15 @@ exports.builder = function (yargs) {

exports.handler = cliWrapper(async argv => {
if (argv.output && !argv.inPlace && (path.resolve(argv.cwd, argv.input) === path.resolve(argv.cwd, argv.output))) {
throw new Error(`cannot instrument files in place, <input> must differ from <output>. Set '--in-place' to force`)
throw new Error('cannot instrument files in place, <input> must differ from <output>. Set \'--in-place\' to force')
}

if (path.relative(argv.cwd, path.resolve(argv.cwd, argv.input)).startsWith('..')) {
throw new Error('cannot instrument files outside project root directory')
}

if (argv.delete && argv.inPlace) {
throw new Error(`cannot use '--delete' when instrumenting files in place`)
throw new Error('cannot use \'--delete\' when instrumenting files in place')
}

if (argv.delete && argv.output && argv.output.length !== 0) {
Expand Down

0 comments on commit 8b4a148

Please sign in to comment.