mirror of
				https://github.com/monkeytypegame/monkeytype.git
				synced 2025-10-27 01:06:21 +08:00 
			
		
		
		
	fix: bailed out tests triggering inconsistent duration check
This commit is contained in:
		
							parent
							
								
									90a888f73f
								
							
						
					
					
						commit
						e9a83d5a62
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		|  | @ -897,7 +897,14 @@ export async function finish(difficultyFailed = false): Promise<void> { | |||
|   let tooShort = false; | ||||
|   //fail checks
 | ||||
|   const dateDur = (TestStats.end3 - TestStats.start3) / 1000; | ||||
|   if (ce.testDuration < dateDur - 0.05 || ce.testDuration > dateDur + 0.05) { | ||||
|   if ( | ||||
|     Config.mode !== "zen" && | ||||
|     !TestState.bailedOut && | ||||
|     (ce.testDuration < dateDur - 0.05 || ce.testDuration > dateDur + 0.05) | ||||
|   ) { | ||||
|     //dont bother checking this for zen mode or bailed out tests because
 | ||||
|     //the duration might be modified to remove trailing afk time
 | ||||
|     //its also not a big deal if the duration is off in those tests
 | ||||
|     Notifications.add("Test invalid - inconsistent test duration", 0); | ||||
|     TestStats.setInvalid(); | ||||
|     dontSave = true; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue