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)