@@ -5,85 +5,85 @@ describe('add', () => {
5
5
expect ( calculator . add ( 0 , 0 ) ) . toBe ( 0 ) ;
6
6
} ) ;
7
7
8
- test . skip ( 'adds 2 and 2' , ( ) => {
8
+ test ( 'adds 2 and 2' , ( ) => {
9
9
expect ( calculator . add ( 2 , 2 ) ) . toBe ( 4 ) ;
10
10
} ) ;
11
11
12
- test . skip ( 'adds positive numbers' , ( ) => {
12
+ test ( 'adds positive numbers' , ( ) => {
13
13
expect ( calculator . add ( 2 , 6 ) ) . toBe ( 8 ) ;
14
14
} ) ;
15
15
} ) ;
16
16
17
17
describe ( 'subtract' , ( ) => {
18
- test . skip ( 'subtracts numbers' , ( ) => {
18
+ test ( 'subtracts numbers' , ( ) => {
19
19
expect ( calculator . subtract ( 10 , 4 ) ) . toBe ( 6 ) ;
20
20
} ) ;
21
21
22
- test . skip ( 'subtracts negative numbers' , ( ) => {
22
+ test ( 'subtracts negative numbers' , ( ) => {
23
23
expect ( calculator . subtract ( - 10 , - 4 ) ) . toBe ( - 6 ) ;
24
24
} ) ;
25
25
26
- test . skip ( 'subtracts numbers of mixed parity' , ( ) => {
26
+ test ( 'subtracts numbers of mixed parity' , ( ) => {
27
27
expect ( calculator . subtract ( - 8 , 7 ) ) . toBe ( - 15 ) ;
28
28
} ) ;
29
29
} ) ;
30
30
31
31
describe ( 'sum' , ( ) => {
32
- test . skip ( 'computes the sum of an empty array' , ( ) => {
32
+ test ( 'computes the sum of an empty array' , ( ) => {
33
33
expect ( calculator . sum ( [ ] ) ) . toBe ( 0 ) ;
34
34
} ) ;
35
35
36
- test . skip ( 'computes the sum of an array of one number' , ( ) => {
36
+ test ( 'computes the sum of an array of one number' , ( ) => {
37
37
expect ( calculator . sum ( [ 7 ] ) ) . toBe ( 7 ) ;
38
38
} ) ;
39
39
40
- test . skip ( 'computes the sum of an array of two numbers' , ( ) => {
40
+ test ( 'computes the sum of an array of two numbers' , ( ) => {
41
41
expect ( calculator . sum ( [ 7 , 11 ] ) ) . toBe ( 18 ) ;
42
42
} ) ;
43
43
44
- test . skip ( 'computes the sum of an array of many numbers' , ( ) => {
44
+ test ( 'computes the sum of an array of many numbers' , ( ) => {
45
45
expect ( calculator . sum ( [ 1 , 3 , 5 , 7 , 9 ] ) ) . toBe ( 25 ) ;
46
46
} ) ;
47
47
} ) ;
48
48
49
49
describe ( 'multiply' , ( ) => {
50
- test . skip ( 'multiplies two numbers' , ( ) => {
50
+ test ( 'multiplies two numbers' , ( ) => {
51
51
expect ( calculator . multiply ( [ 2 , 4 ] ) ) . toBe ( 8 ) ;
52
52
} ) ;
53
53
54
- test . skip ( 'multiplies several numbers' , ( ) => {
54
+ test ( 'multiplies several numbers' , ( ) => {
55
55
expect ( calculator . multiply ( [ 2 , 4 , 6 , 8 , 10 , 12 , 14 ] ) ) . toBe ( 645120 ) ;
56
56
} ) ;
57
57
} ) ;
58
58
59
59
describe ( 'power' , ( ) => {
60
- test . skip ( 'raises one number to the power of another number' , ( ) => {
60
+ test ( 'raises one number to the power of another number' , ( ) => {
61
61
expect ( calculator . power ( 4 , 3 ) ) . toBe ( 64 ) ; // 4 to third power is 64
62
62
} ) ;
63
63
64
- test . skip ( 'raises one number to the power of a large number' , ( ) => {
64
+ test ( 'raises one number to the power of a large number' , ( ) => {
65
65
expect ( calculator . power ( 3 , 10 ) ) . toBe ( 59049 ) ; // 3 to tenth power is 59049
66
66
} ) ;
67
67
} ) ;
68
68
69
69
describe ( 'factorial' , ( ) => {
70
- test . skip ( 'computes the factorial of 0' , ( ) => {
70
+ test ( 'computes the factorial of 0' , ( ) => {
71
71
expect ( calculator . factorial ( 0 ) ) . toBe ( 1 ) ; // 0! = 1
72
72
} ) ;
73
73
74
- test . skip ( 'computes the factorial of 1' , ( ) => {
74
+ test ( 'computes the factorial of 1' , ( ) => {
75
75
expect ( calculator . factorial ( 1 ) ) . toBe ( 1 ) ;
76
76
} ) ;
77
77
78
- test . skip ( 'computes the factorial of 2' , ( ) => {
78
+ test ( 'computes the factorial of 2' , ( ) => {
79
79
expect ( calculator . factorial ( 2 ) ) . toBe ( 2 ) ;
80
80
} ) ;
81
81
82
- test . skip ( 'computes the factorial of 5' , ( ) => {
82
+ test ( 'computes the factorial of 5' , ( ) => {
83
83
expect ( calculator . factorial ( 5 ) ) . toBe ( 120 ) ;
84
84
} ) ;
85
85
86
- test . skip ( 'computes the factorial of 10' , ( ) => {
86
+ test ( 'computes the factorial of 10' , ( ) => {
87
87
expect ( calculator . factorial ( 10 ) ) . toBe ( 3628800 ) ;
88
88
} ) ;
89
89
} ) ;
0 commit comments