From f4e1b0d95ad5c5c291eaa62a76f44447fefc51a8 Mon Sep 17 00:00:00 2001 From: NetMan <13informatyka14@gmail.com> Date: Thu, 11 Jan 2024 09:56:59 +0100 Subject: [PATCH] Passed test for "substract" in exercise 08 --- 08_calculator/calculator.js | 4 ++-- 08_calculator/calculator.spec.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/08_calculator/calculator.js b/08_calculator/calculator.js index e6c682f..a89ce8c 100644 --- a/08_calculator/calculator.js +++ b/08_calculator/calculator.js @@ -2,8 +2,8 @@ const add = function(a, b) { return a + b; }; -const subtract = function() { - +const subtract = function(a, b) { + return a - b; }; const sum = function() { diff --git a/08_calculator/calculator.spec.js b/08_calculator/calculator.spec.js index d79d0dd..996f4c9 100644 --- a/08_calculator/calculator.spec.js +++ b/08_calculator/calculator.spec.js @@ -15,7 +15,7 @@ describe('add', () => { }); describe('subtract', () => { - test.skip('subtracts numbers', () => { + test('subtracts numbers', () => { expect(calculator.subtract(10, 4)).toBe(6); }); });