Skip to content

Commit

Permalink
remove default js in "--watch-extensions" option; closes #3275
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDancingCode authored and boneskull committed Mar 22, 2018
1 parent 3633fa0 commit c580294
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/_mocha
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ program
.option('--trace-deprecation', 'show stack traces on deprecations')
.option('--trace-warnings', 'show stack traces on node process warnings')
.option('--use_strict', 'enforce strict mode')
.option('--watch-extensions <ext>,...', 'additional extensions to monitor with --watch', list, [])
.option('--watch-extensions <ext>,...', 'specify extensions to monitor with --watch', list, [])

This comment has been minimized.

Copy link
@plroebuck

plroebuck Apr 19, 2018

Contributor

Couldn't you get the best of both worlds -- override everything (per #3275 for the TypeScript user) AND use existing Javascript by specifying the default parameter as 'js'?

.option('--watch-extensions <ext>,...',
        'specify extensions to monitor with --watch',
        list,
        ['js'])

This comment has been minimized.

Copy link
@boneskull

boneskull Apr 19, 2018

Contributor

This comment has been minimized.

Copy link
@plroebuck

plroebuck Apr 19, 2018

Contributor

Is @TheDancingCode fixing it himself?

This comment has been minimized.

Copy link
@boneskull

boneskull Apr 19, 2018

Contributor

haven't heard anything about that. the ticket is labeled help wanted so feel free to take a crack at it

This comment has been minimized.

Copy link
@plroebuck

plroebuck Apr 21, 2018

Contributor

PR #3340 submitted for this one line change.

.option('--delay', 'wait for async suite definition')
.option('--allow-uncaught', 'enable uncaught errors to propagate')
.option('--forbid-only', 'causes test marked with only to fail the suite')
Expand Down Expand Up @@ -529,7 +529,7 @@ if (program.watch) {
process.exit(130);
});

const watchFiles = utils.files(cwd, [ 'js' ].concat(program.watchExtensions));
const watchFiles = utils.files(cwd, program.watchExtensions);
let runAgain = false;

loadAndRun = () => {
Expand Down

0 comments on commit c580294

Please sign in to comment.