Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9e2661 commit 22e194eCopy full SHA for 22e194e
1 file changed
Project-Euler/test/Problem016.test.js
@@ -0,0 +1,16 @@
1
+const powerDigitSum = require('../Problem016')
2
+
3
+describe('Check Problem 16 - Power digit sum', () => {
4
+ it('Power digit sum of 2^15', () => {
5
+ expect(powerDigitSum(2, 15)).toBe(26)
6
+ })
7
8
+ it('Power digit sum of 2^1000', () => {
9
+ expect(powerDigitSum()).toBe(1366)
10
+ expect(powerDigitSum(2, 1000)).toBe(1366)
11
12
13
+ it('Power digit sum of 3^5000', () => {
14
+ expect(powerDigitSum(3, 5000)).toBe(11097)
15
16
+})
0 commit comments