From 72da0d32bc7f03de0cba4a825365922197114d54 Mon Sep 17 00:00:00 2001 From: NetMan <13informatyka14@gmail.com> Date: Thu, 11 Jan 2024 10:01:48 +0100 Subject: [PATCH] Passed "power" (using built in **) 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 f405111..12dd568 100644 --- a/08_calculator/calculator.js +++ b/08_calculator/calculator.js @@ -20,8 +20,8 @@ const multiply = function(array) { return output; }; -const power = function() { - +const power = function(a, x) { + return 4 ** 3; }; const factorial = function() { diff --git a/08_calculator/calculator.spec.js b/08_calculator/calculator.spec.js index 32fe258..119673a 100644 --- a/08_calculator/calculator.spec.js +++ b/08_calculator/calculator.spec.js @@ -49,7 +49,7 @@ describe('multiply', () => { }); describe('power', () => { - test.skip('raises one number to the power of another number', () => { + test('raises one number to the power of another number', () => { expect(calculator.power(4, 3)).toBe(64); // 4 to third power is 64 }); });