Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Sep 19, 2016
1 parent 5ed7851 commit e01cf0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ Mocha.prototype.ignoreLeaks = function(ignore) {
*/
Mocha.prototype.randomize = function randomize(seed) {
if (!arguments.length) {
throw new Error('Generate a random seed using --generate-seed on the ' +
'command line, or Mocha.seed() in the browser.');
throw new Error('Generate a random seed using --generate-seed on the '
+ 'command line, or Mocha.seed() in the browser.');
}
if (seed !== false) {
var validSeed = utils.toSafeUnsignedInteger(seed);
Expand Down
5 changes: 3 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ exports.MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 0x1fffffffffffff;
*/
exports.toSafeUnsignedInteger = function toSafeUnsignedInteger(value) {
// absence of second parameter is correct.
/* eslint radix:0 */
var intVal = parseInt(value);
return parseFloat(intVal) === intVal && exports.isSafeUnsignedInteger(intVal)
? intVal
Expand All @@ -815,6 +816,6 @@ exports.isPromise = function isPromise(value) {
* @returns {boolean} result
*/
exports.isSafeUnsignedInteger = function isUnsignedInteger(value) {
return typeof value === 'number' && value > 0 &&
value <= exports.MAX_SAFE_INTEGER && value % 1 === 0;
return typeof value === 'number' && value > 0
&& value <= exports.MAX_SAFE_INTEGER && value % 1 === 0;
};

0 comments on commit e01cf0b

Please sign in to comment.