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 f6db83d6f2
commit 2f4b77f313

View File

@ -1033,21 +1033,23 @@
"type": "bonfire", "type": "bonfire",
"title": "Problem 34: Digit factorials", "title": "Problem 34: Digit factorials",
"tests": [ "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": [], "solutions": [],
"translations": {}, "translations": {},
"challengeSeed": [ "challengeSeed": [
"function euler34() {", "function digitFactorial() {",
" // Good luck!", " // Good luck!",
" return true;", " var sum = 0;",
" var numbers = [];",
" return { sum, numbers };",
"}", "}",
"", "",
"euler34();" "digitFactorial();"
], ],
"description": [ "description": [
"145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.", "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." "Note: as 1! = 1 and 2! = 2 are not sums they are not included."
] ]
}, },