File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
src/library/math/operator/constructive Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -11,24 +11,28 @@ import {
11
11
describe ( greatestCommonDivisor , ( ) => {
12
12
describe ( 'the sad outcomes' , ( ) => {
13
13
describe ( 'when delegated' , ( ) => {
14
- it . each ( [
14
+ const combosOfInoperableNumbers = [
15
15
[ NaN , 100 ] ,
16
16
[ NaN , NaN ] ,
17
17
[ 100 , NaN ] ,
18
- ] ) ( 'should reject inoperable operands' , ( operandA , operandB ) => {
18
+ ] as const ;
19
+
20
+ it . each ( combosOfInoperableNumbers ) ( 'should reject inoperable operands' , ( ...$0 ) => {
19
21
expect . assertions ( 1 ) ;
20
22
21
- expect ( ( ) => greatestCommonDivisor ( operandA , operandB ) ) . toThrow ( Error ) ;
23
+ expect ( ( ) => greatestCommonDivisor ( ... $0 ) ) . toThrow ( Error ) ;
22
24
} ) ;
23
25
24
- it . each ( [
26
+ const combosOfInfiniteNumbers = [
25
27
[ Infinity , 10000000 ] ,
26
28
[ Infinity , Infinity ] ,
27
29
[ 10000000 , Infinity ] ,
28
- ] ) ( 'should reject infinite operands' , ( operandA , operandB ) => {
30
+ ] as const ;
31
+
32
+ it . each ( combosOfInfiniteNumbers ) ( 'should reject infinite operands' , ( ...$0 ) => {
29
33
expect . assertions ( 1 ) ;
30
34
31
- expect ( ( ) => greatestCommonDivisor ( operandA , operandB ) ) . toThrow ( Error ) ;
35
+ expect ( ( ) => greatestCommonDivisor ( ... $0 ) ) . toThrow ( Error ) ;
32
36
} ) ;
33
37
} ) ;
34
38
You can’t perform that action at this time.
0 commit comments