File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
lib/modules/tests/test-run
src/modules/tests/test-run Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11"use strict" ;
22var types_1 = require ( '../types' ) ;
33var run_1 = require ( './run' ) ;
4+ var pageSetTimeout = 1200 ;
5+ var testCompleteTimeout = 800 ;
46var 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 ;
Original file line number Diff line number Diff line change 11import { TEST_COMPLETE , TEST_RUN } from '../types' ;
22import runTaskTests from './run' ;
33
4+ // timeouts = throttle test runs
5+ const pageSetTimeout = 1200 ;
6+ const testCompleteTimeout = 800 ;
7+
48interface 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 :
You can’t perform that action at this time.
0 commit comments