Add Jest coverage report information and two more tests
This commit is contained in:
parent
49850634e1
commit
a0d16705e6
|
@ -33,6 +33,13 @@ npm run test
|
|||
npm run test:coverage
|
||||
```
|
||||
|
||||
For the coverage report:
|
||||
- % Stmts = percent of statements called
|
||||
- % Branch = percent of if/switch branches that have been checked
|
||||
- % Funcs = percent of functions called
|
||||
- % Lines = percent of lines covered
|
||||
- Uncovered Line #s = exactly what it sounds like
|
||||
|
||||
#### Check for specific issues
|
||||
```
|
||||
npm run lint | grep require-returns
|
||||
|
|
|
@ -5,3 +5,14 @@ const world = new World();
|
|||
test('World has empty journal', () => {
|
||||
expect(world.journal.count()).toBe(0);
|
||||
});
|
||||
|
||||
test('World journal has an entry', () => {
|
||||
world.journal.addEntry(0, 'Test');
|
||||
expect(world.journal.count()).toBe(1);
|
||||
});
|
||||
|
||||
test('World journal is cleared', () => {
|
||||
world.journal.addEntry(1, 'Test 2');
|
||||
world.journal.erase();
|
||||
expect(world.journal.count()).toBe(0);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue