Skip to content

Commit

Permalink
Disable timeouts in debug mode
Browse files Browse the repository at this point in the history
Fixes #2355.
  • Loading branch information
novemberborn committed Jan 12, 2020
1 parent 15d73ca commit 2bd890f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api.js
Expand Up @@ -69,7 +69,7 @@ class Api extends Emittery {
const pendingWorkers = new Set();
const timedOutWorkerFiles = new Set();
let restartTimer;
if (apiOptions.timeout) {
if (apiOptions.timeout && !apiOptions.debug) {
const timeout = ms(apiOptions.timeout);

restartTimer = debounce(() => {
Expand Down
4 changes: 4 additions & 0 deletions lib/cli.js
Expand Up @@ -219,6 +219,10 @@ exports.run = async () => { // eslint-disable-line complexity
if (isCi) {
exit('Debugging is not available in CI.');
}

if (combined.timeout) {
console.log(chalk.magenta(` ${figures.warning} The timeout option has been disabled to help with debugging.`));
}
}

if (Reflect.has(combined, 'concurrency') && (!Number.isInteger(combined.concurrency) || combined.concurrency < 0)) {
Expand Down

0 comments on commit 2bd890f

Please sign in to comment.