From 6aa84ac5f561cff27bc5745173c933f627a8f42a Mon Sep 17 00:00:00 2001 From: NetMan <13informatyka14@gmail.com> Date: Thu, 11 Jan 2024 09:56:09 +0100 Subject: [PATCH] Passed tests for "add" in exercise 08 --- 08_calculator/calculator.js | 6 +++--- 08_calculator/calculator.spec.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/08_calculator/calculator.js b/08_calculator/calculator.js index c22e8d2..e6c682f 100644 --- a/08_calculator/calculator.js +++ b/08_calculator/calculator.js @@ -1,9 +1,9 @@ -const add = function() { - +const add = function(a, b) { + return a + b; }; const subtract = function() { - + }; const sum = function() { diff --git a/08_calculator/calculator.spec.js b/08_calculator/calculator.spec.js index 48b08c9..d79d0dd 100644 --- a/08_calculator/calculator.spec.js +++ b/08_calculator/calculator.spec.js @@ -5,11 +5,11 @@ describe('add', () => { expect(calculator.add(0, 0)).toBe(0); }); - test.skip('adds 2 and 2', () => { + test('adds 2 and 2', () => { expect(calculator.add(2, 2)).toBe(4); }); - test.skip('adds positive numbers', () => { + test('adds positive numbers', () => { expect(calculator.add(2, 6)).toBe(8); }); });