failing test earlier

This commit is contained in:
Miodec 2022-03-01 18:41:17 +01:00
parent db601bdc10
commit 7c21991cd9

View file

@ -466,6 +466,13 @@ function handleChar(char: string, charIndex: number): void {
TestInput.updateLastKeypress();
TestInput.pushKeypressWord(TestWords.words.currentIndex);
if (!thisCharCorrect && Config.difficulty == "master") {
TestInput.input.pushHistory();
TestInput.corrected.pushHistory();
TestLogic.fail("difficulty");
return;
}
if (Config.stopOnError == "letter" && !thisCharCorrect) {
return;
}
@ -494,13 +501,6 @@ function handleChar(char: string, charIndex: number): void {
TestInput.input.current = resultingWord;
}
if (!thisCharCorrect && Config.difficulty == "master") {
TestInput.input.pushHistory();
TestInput.corrected.pushHistory();
TestLogic.fail("difficulty");
return;
}
//keymap
if (Config.keymapMode === "react") {
Keymap.flashKey(char, thisCharCorrect);