MCPcopy Index your code
hub / github.com/monkeytypegame/monkeytype / afterTestTextInput

Function afterTestTextInput

frontend/src/ts/test/test-ui.ts:1780–1799  ·  view source on GitHub ↗
(
  correct: boolean,
  increasedWordIndex: boolean | null,
  inputOverride?: string,
)

Source from the content-addressed store, hash-verified

1778}
1779
1780export function afterTestTextInput(
1781 correct: boolean,
1782 increasedWordIndex: boolean | null,
1783 inputOverride?: string,
1784): void {
1785 //nospace cant be handled here becauseword index
1786 // is already increased at this point
1787
1788 void MonkeyPower.addPower(correct);
1789
1790 if (!increasedWordIndex) {
1791 void updateWordLetters({
1792 input: inputOverride ?? getCurrentInput(),
1793 wordIndex: TestState.activeWordIndex,
1794 compositionData: CompositionState.getData(),
1795 });
1796 }
1797
1798 afterAnyTestInput("textInput", correct);
1799}
1800
1801export function afterTestCompositionUpdate(): void {
1802 void updateWordLetters({

Callers

nothing calls this directly

Calls 4

getCurrentInputFunction · 0.90
updateWordLettersFunction · 0.85
afterAnyTestInputFunction · 0.85
getDataMethod · 0.45

Tested by

no test coverage detected