1
- import { IsTriangularNumber } from '../IsTriangularNumber '
1
+ import { TriangularNumberCheck } from '../TriangularNumberCheck '
2
2
3
3
describe . each ( [
4
4
{ inputVal :55 , expectedVal :10 } ,
@@ -11,7 +11,7 @@ describe.each([
11
11
{ inputVal :1 , expectedVal :1 } ,
12
12
] ) ( 'If the number of $inputVal is triangular' , ( { inputVal, expectedVal} ) => {
13
13
test ( `should return ${ expectedVal } ` , ( ) => {
14
- expect ( IsTriangularNumber ( inputVal ) ) . toBe ( expectedVal )
14
+ expect ( TriangularNumberCheck ( inputVal ) ) . toBe ( expectedVal )
15
15
} )
16
16
} )
17
17
@@ -23,7 +23,7 @@ describe.each([
23
23
{ inputVal :"fizz" , expectedVal :- 1 } ,
24
24
] ) ( 'If the number of $inputVal is completely wrong or negative' , ( { inputVal, expectedVal} ) => {
25
25
test ( `should return ${ expectedVal } ` , ( ) => {
26
- expect ( IsTriangularNumber ( inputVal ) ) . not . toBeLessThan ( - 1 )
26
+ expect ( TriangularNumberCheck ( inputVal ) ) . not . toBeLessThan ( - 1 )
27
27
} )
28
28
} )
29
29
@@ -34,6 +34,6 @@ describe.each([
34
34
{ inputVal :23 , expectedVal :0 }
35
35
] ) ( 'If the number of $inputVal is NOT triangular' , ( { inputVal, expectedVal} ) => {
36
36
test ( `should return ${ expectedVal } ` , ( ) => {
37
- expect ( IsTriangularNumber ( inputVal ) ) . toBe ( 0 )
37
+ expect ( TriangularNumberCheck ( inputVal ) ) . toBe ( 0 )
38
38
} )
39
39
} )
0 commit comments