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

Commit435df85

Browse files
committed
fix test runner throttle
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parente076deb commit435df85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/services/testRunner/throttle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const THROTTLE_OFFSET = 300 // ms
55

66
exportconstthrottle=():Date|null=>{
77
constnow=newDate()
8-
if(now.getTime()>lastRun.getTime()+THROTTLE_OFFSET){
8+
if(+now>+lastRun+THROTTLE_OFFSET){
99
lastRun=now
1010
returnlastRun
1111
}
@@ -14,4 +14,4 @@ export const throttle = (): Date | null => {
1414

1515
// quick solution to prevent processing multiple results
1616
// NOTE: may be possible to kill child process early if we migrate to tasks
17-
exportconstdebounce=(startTime:Date):boolean=>lastRun===startTime
17+
exportconstdebounce=(startTime:Date):boolean=>+lastRun<+startTime+THROTTLE_OFFSET

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp