Skip to content

Commit f67cdc3

Browse files
pomkarnath98omkarnathparidagithub-actions
authored
Test cases project euler 6 (TheAlgorithms#1570)
* 📦 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 6 * Updated Documentation in README.md * Updated Documentation in README.md --------- Co-authored-by: Omkarnath Parida <omkarnath.parida@yocket.in> Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 9c07bb1 commit f67cdc3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Project-Euler/test/Problem006.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { squareDifference } from '../Problem006.js'
2+
3+
describe('Square Difference', () => {
4+
test('difference between the sum of the squares of the first ten natural numbers and the square of the sum', () => {
5+
expect(squareDifference(10)).toBe(2640)
6+
})
7+
// Project Euler Condition Check
8+
test('difference between the sum of the squares of the first one hundred natural numbers and the square of the sum', () => {
9+
expect(squareDifference()).toBe(25164150)
10+
})
11+
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy