Skip to content

Commit

Permalink
fix wording in enableTimeouts deprecation msg [ci skip]
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Hiller <[email protected]>
  • Loading branch information
boneskull committed Dec 14, 2018
1 parent 2a76dd7 commit 4351697
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function Mocha(options) {

if ('enableTimeouts' in options) {
utils.deprecate(
'enableTimeouts is DEPRECATED and will be removed from a future version of Mocha. Instead, use "timeouts: false" to disable timeouts.'
'enableTimeouts is DEPRECATED and will be removed from a future version of Mocha. Instead, use "timeout: false" to disable timeouts.'
);
}
this.timeout(
Expand Down

2 comments on commit 4351697

@plroebuck
Copy link
Contributor

@plroebuck plroebuck commented on 4351697 Feb 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not have just said the following (since timeout was historically a numeric field, not boolean)?

Instead, use "timeout: 0" to disable timeouts.

@boneskull
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regardless of the historical “type”, when I want to disable a flag, I set it to false, not zero.

Please sign in to comment.