Additional tests

This commit is contained in:
Angelos Chalaris
2018-11-10 12:01:25 +02:00
parent 761741f149
commit e35777176f
5 changed files with 64 additions and 0 deletions

View File

@ -12,6 +12,9 @@ test('Function works properly', () => {
test('Function works properly', () => {
expect(square(3)).toBe(9);
});
test('Function works properly, cache stores values (coverage)', () => {
expect(square(3)).toBe(9);
});
test('Cache stores values', () => {
expect(Array.from(square.cache)).toEqual([[2, 4], [3, 9]]);
});