Test Failed
Push — master ( 207748...5f3e3e )
by Jesús
03:19
created

test/test-utils.ts   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 20
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 15
mnd 0
bc 0
fnc 2
dl 0
loc 20
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 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