Skip to content

Commit bc3e1fe

Browse files
📦 NEW: Testcases for Project Euler Problem 14
1 parent 396782d commit bc3e1fe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Project-Euler/test/Problem014.test.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { findLongestCollatzSequence } from '../Problem014.js'
2+
3+
describe('Longest Collatz Sequence', () => {
4+
test('if limit is 2', () => {
5+
expect(findLongestCollatzSequence(2)).toBe(1)
6+
})
7+
test('if limit is 13', () => {
8+
expect(findLongestCollatzSequence(13)).toBe(9)
9+
})
10+
// Project Euler Condition Check
11+
test('if limit is 1000000', () => {
12+
expect(findLongestCollatzSequence(1000000)).toBe(837799)
13+
})
14+
})

0 commit comments

Comments
 (0)