Skip to content

Commit

Permalink
simplify a regex that was bothering me
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Jun 9, 2016
1 parent 5254acb commit 9051348
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 @@ -307,7 +307,7 @@ Mocha.prototype.randomize = function randomize(seed) {
} else if (!(typeof seed === 'number' && seed > 0
&& seed <= MAX_SAFE_INTEGER && seed % 1 === 0)) {
// this would be a hexadecimal number represented as a string
if (/^(0x|0X)?[a-fA-F0-9]{1,14}$'/.test(seed)) {
if (/^(0[xX])?[a-fA-F0-9]{1,14}$'/.test(seed)) {
seed = parseInt(seed, 16);
} else {
// a decimal number as string, presumably
Expand Down

0 comments on commit 9051348

Please sign in to comment.