| Total Complexity | 2 |
| Complexity/F | 1 |
| Lines of Code | 20 |
| Function Count | 2 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { state } from '../src/core/state'; |
||
| 2 | |||
| 3 | export function resetState(): void { |
||
| 4 | state.boxes.fill(false); |
||
| 5 | state.wordlist = []; |
||
| 6 | state.currentLanguage = 'english'; |
||
| 7 | } |
||
| 8 | |||
| 9 | export const mockWordlist = [ |
||
| 10 | 'abandon', 'ability', 'able', 'about', 'above', 'absent', 'absorb', 'abstract', |
||
| 11 | 'absurd', 'abuse', 'access', 'accident', 'account', 'accuse', 'achieve', 'acid', |
||
| 12 | 'acoustic', 'acquire', 'across', 'act', 'action', 'actor', 'actress', 'actual' |
||
| 13 | ]; |
||
| 14 | |||
| 15 | export function mockWordlistResponse(words: string[] = mockWordlist) { |
||
| 16 | return Promise.resolve({ |
||
| 17 | text: () => Promise.resolve(words.join('\n')), |
||
| 18 | }); |
||
| 19 | } |
||
| 20 |