File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,8 @@ function checkFive(num){
8
8
result = num + " is greater than 5." ;
9
9
}
10
10
return result ;
11
- }
11
+ }
12
+
13
+ console . log ( checkFive ( 1 ) ) ;
14
+ console . log ( checkFive ( 5 ) ) ;
15
+ console . log ( checkFive ( 9 ) ) ;
Original file line number Diff line number Diff line change
1
+ const checkFive = require ( '../checkFive.js' ) ;
2
+
3
+ describe ( "checkFive" , function ( ) {
4
+
5
+ test ( "returns 'num is less than 5' when num < 5." , function ( ) {
6
+ let output = checkFive ( 2 ) ;
7
+ expect ( output ) . toEqual ( "2 is less than 5." ) ;
8
+ } ) ;
9
+ test ( "returns 'num is equal to 5' when num equals 5." , function ( ) {
10
+ let output = checkFive ( 5 ) ;
11
+ expect ( output ) . toEqual ( "5 is equal to 5." ) ;
12
+ } ) ;
13
+ test ( "returns 'num is greater than 5' when num > 5." , function ( ) {
14
+ let output = checkFive ( 7 ) ;
15
+ expect ( output ) . toEqual ( "7 is greater than 5." ) ;
16
+ } ) ;
17
+ } ) ;
You can’t perform that action at this time.
0 commit comments