Skip to content

Commit

Permalink
feat: simplify nyc config
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Sep 15, 2018
1 parent d664105 commit 86a2c52
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
3 changes: 1 addition & 2 deletions src/generators/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class App extends Generator {
this.pjson.scripts.posttest = 'eslint .'
}
if (this.mocha) {
this.pjson.scripts.test = `nyc mocha --forbid-only "test/**/*.test.${this._ext}"`
this.pjson.scripts.test = `nyc ${this.ts ? '--extension .ts ' : ''}mocha --forbid-only "test/**/*.test.${this._ext}"`
} else {
this.pjson.scripts.test = 'echo NO TESTS'
}
Expand Down Expand Up @@ -343,7 +343,6 @@ class App extends Generator {
this.fs.copyTpl(this.templatePath('tsconfig.json'), this.destinationPath('tsconfig.json'), this)
if (this.mocha) {
this.fs.copyTpl(this.templatePath('test/tsconfig.json'), this.destinationPath('test/tsconfig.json'), this)
this.fs.copyTpl(this.templatePath('nycrc'), this.destinationPath('.nycrc'), this)
}
} else {
this.fs.copyTpl(this.templatePath('eslintrc'), this.destinationPath('.eslintrc'), this)
Expand Down
12 changes: 0 additions & 12 deletions templates/nycrc

This file was deleted.

0 comments on commit 86a2c52

Please sign in to comment.