Skip to content

Commit

Permalink
hard-code TAP_TIMEOUT in rcfiles test
Browse files Browse the repository at this point in the history
Otherwise running with coverage fails, because of bigger default
  • Loading branch information
isaacs committed Jul 1, 2016
1 parent f085de5 commit ec90a96
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 6 additions & 5 deletions bin/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,15 @@ function main () {
}

function constructDefaultArgs () {
var defaultTimeout = 30
if (global.__coverage__) {
defaultTimeout = 240
}

var defaultArgs = {
nodeArgs: [],
nycArgs: [],
timeout: process.env.TAP_TIMEOUT || 30,
timeout: +process.env.TAP_TIMEOUT || defaultTimeout,
color: supportsColor,
reporter: null,
files: [],
Expand All @@ -131,10 +136,6 @@ function constructDefaultArgs () {
statements: 0
}

if (global.__coverage__) {
defaultArgs.timeout = 240
}

if (process.env.TAP_COLORS !== undefined) {
defaultArgs.color = !!(+process.env.TAP_COLORS)
}
Expand Down
5 changes: 4 additions & 1 deletion test/rcfiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ var defaults = {
}

function runTest (rcFile, expect) { return function (t) {
var env = { HOME: process.env.HOME }
var env = {
HOME: process.env.HOME,
TAP_TIMEOUT: 30
}

if (rcFile) {
env.TAP_RCFILE = rcFile
Expand Down

0 comments on commit ec90a96

Please sign in to comment.