Skip to content

Commit e6ff45c

Browse files
committed
adjust test run timeouts
1 parent 29bb4cf commit e6ff45c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

lib/modules/tests/test-run/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"use strict";
22
var types_1 = require('../types');
33
var run_1 = require('./run');
4+
var pageSetTimeout = 1200;
5+
var testCompleteTimeout = 800;
46
var defaultTestRun = {
57
running: false,
68
time: performance.now(),
@@ -17,12 +19,12 @@ function runTest(testRun, action) {
1719
case types_1.TEST_COMPLETE:
1820
return {
1921
running: false,
20-
time: performance.now() + 800,
22+
time: performance.now() + testCompleteTimeout,
2123
};
2224
case 'PAGE_SET':
2325
return {
2426
running: false,
25-
time: performance.now() + 2000,
27+
time: performance.now() + pageSetTimeout,
2628
};
2729
default:
2830
return testRun;

src/modules/tests/test-run/index.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import {TEST_COMPLETE, TEST_RUN} from '../types';
22
import runTaskTests from './run';
33

4+
// timeouts = throttle test runs
5+
const pageSetTimeout = 1200;
6+
const testCompleteTimeout = 800;
7+
48
interface IRunTest {
59
running: boolean;
610
time: number;
@@ -27,14 +31,14 @@ export default function runTest(
2731
case TEST_COMPLETE:
2832
return {
2933
running: false,
30-
time: performance.now() + 800,
34+
time: performance.now() + testCompleteTimeout,
3135
};
3236

3337
case 'PAGE_SET':
3438
// add extra time, as page loading takes longer
3539
return {
3640
running: false,
37-
time: performance.now() + 2000,
41+
time: performance.now() + pageSetTimeout,
3842
};
3943

4044
default:

0 commit comments

Comments
 (0)