Additional tests

This commit is contained in:
Angelos Chalaris
2018-11-10 13:04:37 +02:00
parent 7e22b3fae9
commit 39ff17ae2a
12 changed files with 58 additions and 1 deletions

View File

@ -17,3 +17,8 @@ test('Works with n = 2', () => {
test('Works with n = 3', () => {
expect(add3(1, 2, 3)).toBe(6);
});
test('Throws RangeError if arguments are too few', () => {
expect(() => {
add2(2);
}).toThrow(RangeError);
});