Skip to content

Commit b52bb01

Browse files
committed
chore: only check for inconsistent test duration in timed tests, shorter than 120s
closes monkeytypegame#5401
1 parent 9992d79 commit b52bb01

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

frontend/src/ts/test/test-logic.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -919,13 +919,11 @@ export async function finish(difficultyFailed = false): Promise<void> {
919919
//fail checks
920920
const dateDur = (TestStats.end3 - TestStats.start3) / 1000;
921921
if (
922-
Config.mode !== "zen" &&
922+
Config.mode === "time" &&
923923
!TestState.bailedOut &&
924-
(ce.testDuration < dateDur - 0.25 || ce.testDuration > dateDur + 0.25)
924+
(ce.testDuration < dateDur - 0.1 || ce.testDuration > dateDur + 0.1) &&
925+
ce.testDuration <= 120
925926
) {
926-
//dont bother checking this for zen mode or bailed out tests because
927-
//the duration might be modified to remove trailing afk time
928-
//its also not a big deal if the duration is off in those tests
929927
Notifications.add("Test invalid - inconsistent test duration", 0);
930928
console.error("Test duration inconsistent", ce.testDuration, dateDur);
931929
TestStats.setInvalid();

0 commit comments

Comments
 (0)