aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMiodec <[email protected]>2024-11-25 17:46:50 +0100
committerMiodec <[email protected]>2024-11-25 17:46:50 +0100
commit294847d3890b91ebe3c213b81451fddaaabe8465 (patch)
tree15b0b0f05a3a26fd48b58883782b561047a5d1f8
parent1141051716933007aca8953d15b44d00ae12b072 (diff)
downloadmonkeytype-294847d3890b91ebe3c213b81451fddaaabe8465.tar.gz
monkeytype-294847d3890b91ebe3c213b81451fddaaabe8465.zip
chore: add debug log to addWord function
!nuf
-rw-r--r--frontend/src/ts/test/test-logic.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts
index 147ab8c4a..a2aa2882c 100644
--- a/frontend/src/ts/test/test-logic.ts
+++ b/frontend/src/ts/test/test-logic.ts
@@ -545,10 +545,13 @@ export async function addWord(): Promise<void> {
?.properties?.find((fp) => fp.startsWith("toPush:"));
const toPushCount = funboxToPush?.split(":")[1];
if (toPushCount !== undefined) bound = +toPushCount - 1;
- if (
- TestWords.words.length - TestInput.input.history.length > bound ||
- areAllTestWordsGenerated()
- ) {
+
+ if (TestWords.words.length - TestInput.input.history.length > bound) {
+ console.debug("Not adding word, enough words already");
+ return;
+ }
+ if (areAllTestWordsGenerated()) {
+ console.debug("Not adding word, all words generated");
return;
}