Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8588f9

Browse files
Add tests for Project euler problem 14 solution (#1713)
* 📦 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* 📦 NEW: Testcases for Project Euler Problem 14* Updated Documentation in README.md* 👌 IMPROVE: code improvements---------Co-authored-by: Omkarnath Parida <omkarnath.parida@yocket.in>Co-authored-by: pomkarnath98 <pomkarnath98@users.noreply.github.com>
1 parent55ff0ad commitd8588f9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎Project-Euler/test/Problem014.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import{expect}from'vitest'
2+
import{findLongestCollatzSequence}from'../Problem014.js'
3+
4+
describe('Longest Collatz Sequence',()=>{
5+
test.each([
6+
[2,1],
7+
[13,9],
8+
[1000000,837799]
9+
])(
10+
'if limit is %i, then the Longest Collatz Sequence will be %i',
11+
(a,expected)=>{
12+
expect(findLongestCollatzSequence(a)).toBe(expected)
13+
}
14+
)
15+
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp