@@ -4,38 +4,38 @@ it("always returns a number", function () {
44 expect ( typeof getMid ( 1 , 2 ) ) . toBe ( "number" ) ;
55} ) ;
66
7- it ( "always returns a number2 " , function ( ) {
7+ it ( "always returns a number also if the parameters are string " , function ( ) {
88 expect ( typeof getMid ( "ali" , "ahmed" ) ) . toBe ( "number" ) ;
99} ) ;
1010
11- it ( "always returns a number2 " , function ( ) {
11+ it ( "always returns a zero if the first parameter is not a number " , function ( ) {
1212 expect ( getMid ( "ali" , 5 ) ) . toBe ( 0 ) ;
1313} ) ;
1414
15- it ( "always returns a number2 " , function ( ) {
15+ it ( "always returns a zero if the second parameter is not a number " , function ( ) {
1616 expect ( getMid ( 5 , "ali" ) ) . toBe ( 0 ) ;
1717} ) ;
1818
19- it ( "always returns a number2 " , function ( ) {
19+ it ( "returns the two parameters value if they are the same also if they are a string type " , function ( ) {
2020 expect ( getMid ( "5" , "5" ) ) . toBe ( 5 ) ;
2121} ) ;
2222
23- it ( "return the middle of two numbers " , function ( ) {
23+ it ( "returns the middle of two parameters " , function ( ) {
2424 expect ( getMid ( 10 , 20 ) ) . toBe ( 15 ) ;
2525} ) ;
2626
27- it ( "Entering Same Two numbers " , function ( ) {
27+ it ( "returns the two parameters value if they are the same " , function ( ) {
2828 expect ( getMid ( 5 , 5 ) ) . toBe ( 5 ) ;
2929} ) ;
3030
31- it ( "Not Entering The Second Number" , function ( ) {
31+ it ( "returns the first number if not Entering The Second Number" , function ( ) {
3232 expect ( getMid ( 5 ) ) . toBe ( 5 ) ;
3333} ) ;
3434
35- it ( "Not Entering Any Number " , function ( ) {
35+ it ( "returns zero if the first parameter is not a number and the second parameter is not passing " , function ( ) {
3636 expect ( getMid ( [ 1 , 2 , 3 , 4 ] ) ) . toBe ( 0 ) ;
3737} ) ;
3838
39- it ( "Not Entering Any Number " , function ( ) {
39+ it ( "returns zero if there is no parameters " , function ( ) {
4040 expect ( getMid ( ) ) . toBe ( 0 ) ;
4141} ) ;
0 commit comments