From 9c07bb110758aae6316385c966b42add948b0586 Mon Sep 17 00:00:00 2001 From: Omkarnath Parida Date: Thu, 26 Oct 2023 19:04:20 +0530 Subject: [PATCH] Test cases project euler 9 (#1571) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 📦 NEW: Added solution for ProjectEuler-007 * 🐛 FIX: Spelling mistake fixes * 👌 IMPROVE: changed variable name from `inc` to `candidateValue` and thrown error in case of invalid input * 👌 IMPROVE: Modified the code * 👌 IMPROVE: Added test case for ProjectEuler Problem001 * 👌 IMPROVE: Added test cases for Project Euler Problem 4 * 👌 IMPROVE: auto prettier fixes * 👌 IMPROVE: Added test cases for project euler problem 9 * Updated Documentation in README.md * Updated Documentation in README.md --------- Co-authored-by: Omkarnath Parida Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> --- Project-Euler/test/Problem009.test.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Project-Euler/test/Problem009.test.js diff --git a/Project-Euler/test/Problem009.test.js b/Project-Euler/test/Problem009.test.js new file mode 100644 index 000000000..3919fa283 --- /dev/null +++ b/Project-Euler/test/Problem009.test.js @@ -0,0 +1,8 @@ +import { findSpecialPythagoreanTriplet } from '../Problem009.js' + +describe('Pythagorean Triplet', () => { + // Project Euler Condition Check + test('the multiplication of the pythagorean triplet where a + b + c = 1000', () => { + expect(findSpecialPythagoreanTriplet()).toBe(31875000) + }) +})