File tree 2 files changed +10
-4
lines changed
lib/modules/tests/test-run
src/modules/tests/test-run
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
var types_1 = require ( '../types' ) ;
3
3
var run_1 = require ( './run' ) ;
4
+ var pageSetTimeout = 1200 ;
5
+ var testCompleteTimeout = 800 ;
4
6
var defaultTestRun = {
5
7
running : false ,
6
8
time : performance . now ( ) ,
@@ -17,12 +19,12 @@ function runTest(testRun, action) {
17
19
case types_1 . TEST_COMPLETE :
18
20
return {
19
21
running : false ,
20
- time : performance . now ( ) + 800 ,
22
+ time : performance . now ( ) + testCompleteTimeout ,
21
23
} ;
22
24
case 'PAGE_SET' :
23
25
return {
24
26
running : false ,
25
- time : performance . now ( ) + 2000 ,
27
+ time : performance . now ( ) + pageSetTimeout ,
26
28
} ;
27
29
default :
28
30
return testRun ;
Original file line number Diff line number Diff line change 1
1
import { TEST_COMPLETE , TEST_RUN } from '../types' ;
2
2
import runTaskTests from './run' ;
3
3
4
+ // timeouts = throttle test runs
5
+ const pageSetTimeout = 1200 ;
6
+ const testCompleteTimeout = 800 ;
7
+
4
8
interface IRunTest {
5
9
running : boolean ;
6
10
time : number ;
@@ -27,14 +31,14 @@ export default function runTest(
27
31
case TEST_COMPLETE :
28
32
return {
29
33
running : false ,
30
- time : performance . now ( ) + 800 ,
34
+ time : performance . now ( ) + testCompleteTimeout ,
31
35
} ;
32
36
33
37
case 'PAGE_SET' :
34
38
// add extra time, as page loading takes longer
35
39
return {
36
40
running : false ,
37
- time : performance . now ( ) + 2000 ,
41
+ time : performance . now ( ) + pageSetTimeout ,
38
42
} ;
39
43
40
44
default :
You can’t perform that action at this time.
0 commit comments