Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6ff45c

Browse files
committed
adjust test run timeouts
1 parent29bb4cf commite6ff45c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"use strict";
22
vartypes_1=require('../types');
33
varrun_1=require('./run');
4+
varpageSetTimeout=1200;
5+
vartestCompleteTimeout=800;
46
vardefaultTestRun={
57
running:false,
68
time:performance.now(),
@@ -17,12 +19,12 @@ function runTest(testRun, action) {
1719
casetypes_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
returntestRun;

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import{TEST_COMPLETE,TEST_RUN}from'../types';
22
importrunTaskTestsfrom'./run';
33

4+
// timeouts = throttle test runs
5+
constpageSetTimeout=1200;
6+
consttestCompleteTimeout=800;
7+
48
interfaceIRunTest{
59
running:boolean;
610
time:number;
@@ -27,14 +31,14 @@ export default function runTest(
2731
caseTEST_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)

[8]ページ先頭

©2009-2025 Movatter.jp