Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Commit

Permalink
fix(runtest): accept and format timeouts properly
Browse files Browse the repository at this point in the history
Closes #10
  • Loading branch information
thetutlage committed Oct 29, 2017
1 parent 0cf627f commit 2952d39
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions commands/RunTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class RunTests extends Command {
return `test
{ group?=all: Define the test groups to be executed. Multiple groups are seperated by comma }
{ -b, --bail: Stop running tests on first failure }
{ -t, --timeout: Define a global timeout for all the tests }
{ -t, --timeout=@value: Define a global timeout for all the tests }
{ -f, --files=@value: Pick only specific files. File names are seperated by comma }
{ -g, --grep=@value: Grep on tests title to run only selected tests }
{ --glob=@value: Define a custom glob to pick test files }`
Expand Down Expand Up @@ -109,10 +109,10 @@ class RunTests extends Command {
* If there is a global timeout set it on
* runner
*/
timeout = Number(timeout)
if (timeout && !isNaN(timeout)) {
debug('global timeout %d', timeout)
this.runner.timeout(timeout)
const numberedTimeout = Number(timeout)
if (timeout && !isNaN(numberedTimeout)) {
debug('global timeout %d', numberedTimeout)
this.runner.timeout(numberedTimeout)
}

/**
Expand Down

0 comments on commit 2952d39

Please sign in to comment.