We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
SumOfGeometricProgression
1 parent 10febce commit 1ea7a5cCopy full SHA for 1ea7a5c
Maths/test/SumOfGeometricProgression.test.js
@@ -8,4 +8,8 @@ describe('Sum Of Geometric Progression', () => {
8
it('should return the sum of an infinite GP', () => {
9
expect(sumOfGeometricProgression(2, 0.5, Infinity)).toBe(4)
10
})
11
+
12
+ it('should throw when series diverges', () => {
13
+ expect(() => sumOfGeometricProgression(1, 1, Infinity)).toThrowError()
14
+ })
15
0 commit comments