feat(seed): Change Project Euler assertion (#16021)

This commit is contained in:
Alvin Kristanto
2017-10-25 12:45:38 +07:00
committed by Quincy Larson
parent c9237c4a16
commit b64f642187

View File

@ -1033,21 +1033,23 @@
"type": "bonfire",
"title": "Problem 34: Digit factorials",
"tests": [
"assert.strictEqual(euler34(), 40730, 'message: <code>euler34()</code> should return 40730.');"
"assert.deepEqual(digitFactorial(), { sum: 40730, numbers: [145, 40585] }, 'message: <code>digitFactorial()</code> should return { sum: 40730, numbers: [145, 40585] }.');"
],
"solutions": [],
"translations": {},
"challengeSeed": [
"function euler34() {",
"function digitFactorial() {",
" // Good luck!",
" return true;",
" var sum = 0;",
" var numbers = [];",
" return { sum, numbers };",
"}",
"",
"euler34();"
"digitFactorial();"
],
"description": [
"145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.",
"Find the sum of all numbers which are equal to the sum of the factorial of their digits.",
"Find the numbers and the sum of the numbers which are equal to the sum of the factorial of their digits.",
"Note: as 1! = 1 and 2! = 2 are not sums they are not included."
]
},