Skip to content

Commit b07529f

Browse files
authored
tests: Project Euler Problem 3 (TheAlgorithms#1207)
1 parent 0084acf commit b07529f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Project-Euler/test/Problem003.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { largestPrime } from '../Problem003.js'
2+
3+
describe('Largest prime factor', () => {
4+
test('if the number is 13195', () => {
5+
expect(largestPrime(13195)).toBe(29)
6+
})
7+
// Project Euler Condition Check
8+
test('if the number is 600851475143', () => {
9+
// Default value is same as the tested value
10+
expect(largestPrime()).toBe(6857)
11+
})
12+
})

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