We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 396782d commit bc3e1feCopy full SHA for bc3e1fe
Project-Euler/test/Problem014.test.js
@@ -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