added debugging function

This commit is contained in:
Jack 2021-08-08 20:51:20 +01:00
parent d9390645de
commit a2c1311a57
3 changed files with 21 additions and 0 deletions

View file

@ -27,3 +27,5 @@ global.crownTest = async () => {
};
global.filterDebug = Account.toggleFilterDebug;
global.stats = TestStats.getStats;

View file

@ -23,3 +23,4 @@ import "./input-controller";
import "./ready";
import "./about-page";
import * as Account from "./account";
import * as TestStats from "./test-stats";

View file

@ -42,6 +42,24 @@ export let keypressTimings = {
},
};
export function getStats() {
return {
start,
end,
wpmHistory,
rawHistory,
burstHistory,
keypressPerSecond,
currentKeypress,
lastKeypress,
currentBurstStart,
lastSecondNotRound,
missedWords,
accuracy,
keypressTimings,
};
}
export function restart() {
start = 0;
end = 0;