mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 00:01:37 +08:00

* 📦 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>
12 lines
475 B
JavaScript
12 lines
475 B
JavaScript
import { squareDifference } from '../Problem006.js'
|
|
|
|
describe('Square Difference', () => {
|
|
test('difference between the sum of the squares of the first ten natural numbers and the square of the sum', () => {
|
|
expect(squareDifference(10)).toBe(2640)
|
|
})
|
|
// Project Euler Condition Check
|
|
test('difference between the sum of the squares of the first one hundred natural numbers and the square of the sum', () => {
|
|
expect(squareDifference()).toBe(25164150)
|
|
})
|
|
})
|