From 3cc6d39c73fbea4b066a97c126983d3e78d28564 Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: 2022年7月30日 16:51:30 +0800 Subject: [PATCH 01/14] Adding Pythagoras Theorem To calculate the hypothenuse, adjacent and base of the triangle --- Maths/PythagorasTheorem.js | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Maths/PythagorasTheorem.js diff --git a/Maths/PythagorasTheorem.js b/Maths/PythagorasTheorem.js new file mode 100644 index 0000000000..e4311ec7aa --- /dev/null +++ b/Maths/PythagorasTheorem.js @@ -0,0 +1,61 @@ +/** + * @function calcHypothenuse + * @description Calculate the length of hypothenuse of triangle + * @param {Integer} base - Integer + * @param {Integer} adjacent - Integer + * @return {Integer} - hypothenuse + * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) + * @example calcHypothenuse(2, 3) = 4 + */ + +const calcHypothenuse = (adjacent, base) => { + const hypothenuse = Math.sqrt((adjacent ** 2) + (base ** 2)) + + return hypothenuse +} + +/** + * @function calcAdjacent + * @description Calculate the length of adjacent of triangle + * @param {Integer} hypothenuse - Integer + * @param {Integer} base - Integer + * @return {Integer} - adjacent + * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) + * @example calcAdjacent(4, 3) = 2 + */ + +const calcAdjacent = (hypothenuse, base) => { + if(base>= hypothenuse){ + return "Length of base must be smaller than hypothenuse" + } + + const adjacent = Math.sqrt((hypothenuse ** 2) - (base ** 2)) + return adjacent +} + + +/** + * @function calcBase + * @description Calculate the length of hypothenuse of triangle + * @param {Integer} hypothenuse - Integer + * @param {Integer} adjacent - Integer + * @return {Integer} - base + * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) + * @example calcBase(4, 2) = 3 + */ + +const calcBase = (hypothenuse, adjacent) => { + + if(adjacent>= hypothenuse){ + return "Length of adjacent must be smaller than hypothenuse" + } + + const base = Math.sqrt((hypothenuse ** 2) - (adjacent ** 2)) + return base +} + +export{ +calcHypothenuse, +calcAdjacent, +calcBase +} From 214fc174815d1be02a84062a9721e8f834fb8f12 Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: 2022年7月30日 17:35:36 +0800 Subject: [PATCH 02/14] Update Code Format --- Maths/PythagorasTheorem.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Maths/PythagorasTheorem.js b/Maths/PythagorasTheorem.js index e4311ec7aa..0b72e4dbad 100644 --- a/Maths/PythagorasTheorem.js +++ b/Maths/PythagorasTheorem.js @@ -7,10 +7,8 @@ * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) * @example calcHypothenuse(2, 3) = 4 */ - const calcHypothenuse = (adjacent, base) => { const hypothenuse = Math.sqrt((adjacent ** 2) + (base ** 2)) - return hypothenuse } @@ -23,12 +21,10 @@ const calcHypothenuse = (adjacent, base) => { * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) * @example calcAdjacent(4, 3) = 2 */ - const calcAdjacent = (hypothenuse, base) => { - if(base>= hypothenuse){ - return "Length of base must be smaller than hypothenuse" + if (base>= hypothenuse) { + return 'Length of base must be smaller than hypothenuse' } - const adjacent = Math.sqrt((hypothenuse ** 2) - (base ** 2)) return adjacent } @@ -43,18 +39,15 @@ const calcAdjacent = (hypothenuse, base) => { * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) * @example calcBase(4, 2) = 3 */ - const calcBase = (hypothenuse, adjacent) => { - - if(adjacent>= hypothenuse){ - return "Length of adjacent must be smaller than hypothenuse" + if (adjacent>= hypothenuse) { + return 'Length of adjacent must be smaller than hypothenuse' } - const base = Math.sqrt((hypothenuse ** 2) - (adjacent ** 2)) return base } -export{ +export { calcHypothenuse, calcAdjacent, calcBase From 51f32d7c8b1f14c7dc731beee617a963f8205c6c Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Mon, 1 Aug 2022 02:51:52 +0800 Subject: [PATCH 03/14] Create PythagorasTheorem.test.js --- Maths/test/PythagorasTheorem.test.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Maths/test/PythagorasTheorem.test.js diff --git a/Maths/test/PythagorasTheorem.test.js b/Maths/test/PythagorasTheorem.test.js new file mode 100644 index 0000000000..ae01e80759 --- /dev/null +++ b/Maths/test/PythagorasTheorem.test.js @@ -0,0 +1,26 @@ +import * as pytheorem from "../PythagorasTheorem" + +test('Testing on hypothenuse calculation', () => { + const hypothenuse = pytheorem.calcHypothenuse(2.0, 3.0) + expect(hypothenuse).toBe(4.0) +}) + +test('Testing on adjacent calculation', () => { + const adjacent = pytheorem.calcAdjacent(4.0, 3.0) + expect(adjacent).toBe(2.0) +}) + +test('Testing on adjacent calculation', () => { + const adjacent = pytheorem.calcAdjacent(2.0, 4.0) + expect(adjacent).toBe('Length of adjacent must be smaller than hypothenuse') +}) + +test('Testing on base calculation', () => { + const base = pytheorem.calcHypothenuse(4.0, 2.0) + expect(hypothenuse).toBe(3.0) +}) + +test('Testing on base calculation', () => { + const base = pytheorem.calcHypothenuse(3.0, 4.0) + expect(hypothenuse).toBe('Length of base must be smaller than hypothenuse') +}) From 36996b84dddb4d0a643685a488faeebcbe34a68e Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Mon, 1 Aug 2022 03:03:08 +0800 Subject: [PATCH 04/14] Updated File Name and Deduplication --- Maths/PythagorasTheorem.js | 54 ------------------------------------- Maths/PythagoreanTheorem.js | 35 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 54 deletions(-) delete mode 100644 Maths/PythagorasTheorem.js create mode 100644 Maths/PythagoreanTheorem.js diff --git a/Maths/PythagorasTheorem.js b/Maths/PythagorasTheorem.js deleted file mode 100644 index 0b72e4dbad..0000000000 --- a/Maths/PythagorasTheorem.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @function calcHypothenuse - * @description Calculate the length of hypothenuse of triangle - * @param {Integer} base - Integer - * @param {Integer} adjacent - Integer - * @return {Integer} - hypothenuse - * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) - * @example calcHypothenuse(2, 3) = 4 - */ -const calcHypothenuse = (adjacent, base) => { - const hypothenuse = Math.sqrt((adjacent ** 2) + (base ** 2)) - return hypothenuse -} - -/** - * @function calcAdjacent - * @description Calculate the length of adjacent of triangle - * @param {Integer} hypothenuse - Integer - * @param {Integer} base - Integer - * @return {Integer} - adjacent - * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) - * @example calcAdjacent(4, 3) = 2 - */ -const calcAdjacent = (hypothenuse, base) => { - if (base>= hypothenuse) { - return 'Length of base must be smaller than hypothenuse' - } - const adjacent = Math.sqrt((hypothenuse ** 2) - (base ** 2)) - return adjacent -} - - -/** - * @function calcBase - * @description Calculate the length of hypothenuse of triangle - * @param {Integer} hypothenuse - Integer - * @param {Integer} adjacent - Integer - * @return {Integer} - base - * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) - * @example calcBase(4, 2) = 3 - */ -const calcBase = (hypothenuse, adjacent) => { - if (adjacent>= hypothenuse) { - return 'Length of adjacent must be smaller than hypothenuse' - } - const base = Math.sqrt((hypothenuse ** 2) - (adjacent ** 2)) - return base -} - -export { -calcHypothenuse, -calcAdjacent, -calcBase -} diff --git a/Maths/PythagoreanTheorem.js b/Maths/PythagoreanTheorem.js new file mode 100644 index 0000000000..f7e38a5ead --- /dev/null +++ b/Maths/PythagoreanTheorem.js @@ -0,0 +1,35 @@ +/** + * @function calcHypothenuse + * @description Calculate the length of hypothenuse of triangle + * @param {Integer} base - Integer + * @param {Integer} adjacent - Integer + * @return {Integer} - hypothenuse + * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) + * @example calcHypothenuse(2, 3) = 4 + */ +const calcHypothenuse = (side1, side2) => { + const hypothenuse = Math.sqrt((adjacent ** 2) + (base ** 2)) + return hypothenuse +} + +/** + * @function calcAdjacent + * @description Calculate the length of adjacent of triangle + * @param {Integer} hypothenuse - Integer + * @param {Integer} base - Integer + * @return {Integer} - adjacent + * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) + * @example calcAdjacent(4, 3) = 2 + */ +const calcOtherSides = (hypothenuse, side1) => { + if (side1>= hypothenuse) { + return 'Length of side1 must be smaller than hypothenuse' + } + const side2 = Math.sqrt((hypothenuse ** 2) - (side1 ** 2)) + return side2 +} + +export { +calcHypothenuse, +calcOtherSides, +} From 12aa4ca51d8381eb505af7c49f2259fcf55f9f48 Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Mon, 1 Aug 2022 03:08:03 +0800 Subject: [PATCH 05/14] Updated File Name and Deduplication --- Maths/test/PythagorasTheorem.test.js | 26 -------------------------- Maths/test/PythagoreanTheorem.test.js | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 26 deletions(-) delete mode 100644 Maths/test/PythagorasTheorem.test.js create mode 100644 Maths/test/PythagoreanTheorem.test.js diff --git a/Maths/test/PythagorasTheorem.test.js b/Maths/test/PythagorasTheorem.test.js deleted file mode 100644 index ae01e80759..0000000000 --- a/Maths/test/PythagorasTheorem.test.js +++ /dev/null @@ -1,26 +0,0 @@ -import * as pytheorem from "../PythagorasTheorem" - -test('Testing on hypothenuse calculation', () => { - const hypothenuse = pytheorem.calcHypothenuse(2.0, 3.0) - expect(hypothenuse).toBe(4.0) -}) - -test('Testing on adjacent calculation', () => { - const adjacent = pytheorem.calcAdjacent(4.0, 3.0) - expect(adjacent).toBe(2.0) -}) - -test('Testing on adjacent calculation', () => { - const adjacent = pytheorem.calcAdjacent(2.0, 4.0) - expect(adjacent).toBe('Length of adjacent must be smaller than hypothenuse') -}) - -test('Testing on base calculation', () => { - const base = pytheorem.calcHypothenuse(4.0, 2.0) - expect(hypothenuse).toBe(3.0) -}) - -test('Testing on base calculation', () => { - const base = pytheorem.calcHypothenuse(3.0, 4.0) - expect(hypothenuse).toBe('Length of base must be smaller than hypothenuse') -}) diff --git a/Maths/test/PythagoreanTheorem.test.js b/Maths/test/PythagoreanTheorem.test.js new file mode 100644 index 0000000000..f0cbceb4e4 --- /dev/null +++ b/Maths/test/PythagoreanTheorem.test.js @@ -0,0 +1,17 @@ +import * as pytheorem from "../PythagoreanTheorem" + +test('Testing on hypothenuse calculation', () => { + const hypothenuse = pytheorem.calcHypothenuse(2.0, 3.0) + expect(hypothenuse).toBe(4.0) +}) + +test('Testing on other sides calculation', () => { + const side = pytheorem.calcAdjacent(4.0, 3.0) + expect(side).toBe(2.0) +}) + +test('Testing on other sides calculation', () => { + const side = pytheorem.calcAdjacent(2.0, 4.0) + expect(side).toBe('Length of side1 must be smaller than hypothenuse') +}) + From 978a1003286563bc6689761c2851cc87922e7429 Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Mon, 1 Aug 2022 03:41:20 +0800 Subject: [PATCH 06/14] Update PythagoreanTheorem.js --- Maths/PythagoreanTheorem.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Maths/PythagoreanTheorem.js b/Maths/PythagoreanTheorem.js index f7e38a5ead..cadc5fd07f 100644 --- a/Maths/PythagoreanTheorem.js +++ b/Maths/PythagoreanTheorem.js @@ -1,35 +1,34 @@ /** * @function calcHypothenuse * @description Calculate the length of hypothenuse of triangle - * @param {Integer} base - Integer - * @param {Integer} adjacent - Integer + * @param {Integer} side1 - Integer + * @param {Integer} side2 - Integer * @return {Integer} - hypothenuse - * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) + * @see [calcHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) * @example calcHypothenuse(2, 3) = 4 */ const calcHypothenuse = (side1, side2) => { const hypothenuse = Math.sqrt((adjacent ** 2) + (base ** 2)) return hypothenuse } - /** - * @function calcAdjacent - * @description Calculate the length of adjacent of triangle + * @function calcOtherSides + * @description Calculate the length of other sides of triangle * @param {Integer} hypothenuse - Integer - * @param {Integer} base - Integer - * @return {Integer} - adjacent - * @see [findHypothenuse](https://en.wikipedia.org/wiki/Pythagorean_theorem) - * @example calcAdjacent(4, 3) = 2 + * @param {Integer} side1 - Integer + * @return {Integer} - side2 + * @see [calcOtherSides](https://en.wikipedia.org/wiki/Pythagorean_theorem) + * @example calcOtherSides(4, 3) = 2 */ const calcOtherSides = (hypothenuse, side1) => { if (side1>= hypothenuse) { return 'Length of side1 must be smaller than hypothenuse' } - const side2 = Math.sqrt((hypothenuse ** 2) - (side1 ** 2)) - return side2 + const side2 = Math.sqrt((hypothenuse ** 2) - (side1 ** 2)) + return side2 } export { -calcHypothenuse, -calcOtherSides, + calcHypothenuse, + calcOtherSides, } From b1ae147d343e3621d1616724a5acd963fc70e14c Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Mon, 1 Aug 2022 04:44:44 +0800 Subject: [PATCH 07/14] Update on Indentation --- Maths/PythagoreanTheorem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maths/PythagoreanTheorem.js b/Maths/PythagoreanTheorem.js index cadc5fd07f..08714221f6 100644 --- a/Maths/PythagoreanTheorem.js +++ b/Maths/PythagoreanTheorem.js @@ -24,8 +24,8 @@ const calcOtherSides = (hypothenuse, side1) => { if (side1>= hypothenuse) { return 'Length of side1 must be smaller than hypothenuse' } - const side2 = Math.sqrt((hypothenuse ** 2) - (side1 ** 2)) - return side2 + const side2 = Math.sqrt((hypothenuse ** 2) - (side1 ** 2)) + return side2 } export { From 3ae304c13cc87735136534c780e3288965f414a5 Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Wed, 3 Aug 2022 20:56:35 +0800 Subject: [PATCH 08/14] Updated function's name --- Maths/PythagoreanTheorem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maths/PythagoreanTheorem.js b/Maths/PythagoreanTheorem.js index 08714221f6..d12165c678 100644 --- a/Maths/PythagoreanTheorem.js +++ b/Maths/PythagoreanTheorem.js @@ -20,7 +20,7 @@ const calcHypothenuse = (side1, side2) => { * @see [calcOtherSides](https://en.wikipedia.org/wiki/Pythagorean_theorem) * @example calcOtherSides(4, 3) = 2 */ -const calcOtherSides = (hypothenuse, side1) => { +const calcOtherSide = (hypothenuse, side1) => { if (side1>= hypothenuse) { return 'Length of side1 must be smaller than hypothenuse' } From 5cd94d8f082ae921891461d80271860bfe9e8e88 Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Wed, 3 Aug 2022 20:57:40 +0800 Subject: [PATCH 09/14] Update PythagoreanTheorem.test.js --- Maths/test/PythagoreanTheorem.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maths/test/PythagoreanTheorem.test.js b/Maths/test/PythagoreanTheorem.test.js index f0cbceb4e4..a3b6137bc9 100644 --- a/Maths/test/PythagoreanTheorem.test.js +++ b/Maths/test/PythagoreanTheorem.test.js @@ -6,12 +6,12 @@ test('Testing on hypothenuse calculation', () => { }) test('Testing on other sides calculation', () => { - const side = pytheorem.calcAdjacent(4.0, 3.0) + const side = pytheorem.calcOtherSide(4.0, 3.0) expect(side).toBe(2.0) }) test('Testing on other sides calculation', () => { - const side = pytheorem.calcAdjacent(2.0, 4.0) + const side = pytheorem.calcOtherSide(2.0, 4.0) expect(side).toBe('Length of side1 must be smaller than hypothenuse') }) From af5d82bf3c64f0038c88076ac37e8eb31331a59f Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Thu, 4 Aug 2022 02:49:56 +0800 Subject: [PATCH 10/14] Update PythagoreanTheorem.js --- Maths/PythagoreanTheorem.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Maths/PythagoreanTheorem.js b/Maths/PythagoreanTheorem.js index d12165c678..64c959c8bb 100644 --- a/Maths/PythagoreanTheorem.js +++ b/Maths/PythagoreanTheorem.js @@ -12,13 +12,13 @@ const calcHypothenuse = (side1, side2) => { return hypothenuse } /** - * @function calcOtherSides + * @function calcOtherSide * @description Calculate the length of other sides of triangle * @param {Integer} hypothenuse - Integer * @param {Integer} side1 - Integer * @return {Integer} - side2 - * @see [calcOtherSides](https://en.wikipedia.org/wiki/Pythagorean_theorem) - * @example calcOtherSides(4, 3) = 2 + * @see [calcOtherSide](https://en.wikipedia.org/wiki/Pythagorean_theorem) + * @example calcOtherSide(4, 3) = 2 */ const calcOtherSide = (hypothenuse, side1) => { if (side1>= hypothenuse) { @@ -30,5 +30,5 @@ const calcOtherSide = (hypothenuse, side1) => { export { calcHypothenuse, - calcOtherSides, + calcOtherSide, } From 153f4053093b5e525b42225d0f087d38256955ba Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Fri, 5 Aug 2022 21:02:32 +0800 Subject: [PATCH 11/14] Update PythagoreanTheorem.test.js --- Maths/test/PythagoreanTheorem.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Maths/test/PythagoreanTheorem.test.js b/Maths/test/PythagoreanTheorem.test.js index a3b6137bc9..fb83838e5f 100644 --- a/Maths/test/PythagoreanTheorem.test.js +++ b/Maths/test/PythagoreanTheorem.test.js @@ -1,17 +1,17 @@ import * as pytheorem from "../PythagoreanTheorem" test('Testing on hypothenuse calculation', () => { - const hypothenuse = pytheorem.calcHypothenuse(2.0, 3.0) - expect(hypothenuse).toBe(4.0) + const hypothenuse = pytheorem.calcHypothenuse(6.0, 8.0) + expect(hypothenuse).toBe(10.0) }) test('Testing on other sides calculation', () => { - const side = pytheorem.calcOtherSide(4.0, 3.0) - expect(side).toBe(2.0) + const side = pytheorem.calcOtherSide(10.0, 6.0) + expect(side).toBe(8.0) }) test('Testing on other sides calculation', () => { - const side = pytheorem.calcOtherSide(2.0, 4.0) + const side = pytheorem.calcOtherSide(6.0, 10.0) expect(side).toBe('Length of side1 must be smaller than hypothenuse') }) From 0dab0e415da2d9a61f0183e310e2deb7a25391c1 Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Fri, 5 Aug 2022 21:13:33 +0800 Subject: [PATCH 12/14] Update PythagoreanTheorem.js --- Maths/PythagoreanTheorem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maths/PythagoreanTheorem.js b/Maths/PythagoreanTheorem.js index 64c959c8bb..c9ee09d25f 100644 --- a/Maths/PythagoreanTheorem.js +++ b/Maths/PythagoreanTheorem.js @@ -8,7 +8,7 @@ * @example calcHypothenuse(2, 3) = 4 */ const calcHypothenuse = (side1, side2) => { - const hypothenuse = Math.sqrt((adjacent ** 2) + (base ** 2)) + const hypothenuse = Math.sqrt((side1 ** 2) + (side2 ** 2)) return hypothenuse } /** From 462f4f11a187643bb1a7deb3c4b220e4089f62c6 Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Fri, 5 Aug 2022 21:25:19 +0800 Subject: [PATCH 13/14] Update PythagoreanTheorem.js --- Maths/PythagoreanTheorem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maths/PythagoreanTheorem.js b/Maths/PythagoreanTheorem.js index c9ee09d25f..adf788fe18 100644 --- a/Maths/PythagoreanTheorem.js +++ b/Maths/PythagoreanTheorem.js @@ -30,5 +30,5 @@ const calcOtherSide = (hypothenuse, side1) => { export { calcHypothenuse, - calcOtherSide, + calcOtherSide } From 6a27fa2b24bf0d147b9cc469d68b7a01bf73e2b8 Mon Sep 17 00:00:00 2001 From: cwh0430 <108912628+cwh0430@users.noreply.github.com> Date: Fri, 5 Aug 2022 21:26:28 +0800 Subject: [PATCH 14/14] Update PythagoreanTheorem.test.js --- Maths/test/PythagoreanTheorem.test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Maths/test/PythagoreanTheorem.test.js b/Maths/test/PythagoreanTheorem.test.js index fb83838e5f..740d7750af 100644 --- a/Maths/test/PythagoreanTheorem.test.js +++ b/Maths/test/PythagoreanTheorem.test.js @@ -1,4 +1,4 @@ -import * as pytheorem from "../PythagoreanTheorem" +import * as pytheorem from '../PythagoreanTheorem' test('Testing on hypothenuse calculation', () => { const hypothenuse = pytheorem.calcHypothenuse(6.0, 8.0) @@ -14,4 +14,3 @@ test('Testing on other sides calculation', () => { const side = pytheorem.calcOtherSide(6.0, 10.0) expect(side).toBe('Length of side1 must be smaller than hypothenuse') }) -