@@ -8,3 +8,25 @@ const isProperFraction = require("../implement/2-is-proper-fraction");
88test ( `should return false when denominator is zero` , ( ) => {
99 expect ( isProperFraction ( 1 , 0 ) ) . toEqual ( false ) ;
1010} ) ;
11+ test ( `should return false when denominator is smaller` , ( ) => {
12+ expect ( isProperFraction ( 4 , 2 ) ) . toEqual ( false ) ;
13+ } ) ;
14+ test ( "should return true when numerator < denominator and both positive" , ( ) => {
15+ expect ( isProperFraction ( 1 , 2 ) ) . toEqual ( true ) ;
16+ expect ( isProperFraction ( 3 , 5 ) ) . toEqual ( true ) ;
17+ } ) ;
18+ test ( "should return false when numerator is negative" , ( ) => {
19+ expect ( isProperFraction ( - 2 , 5 ) ) . toEqual ( false ) ;
20+ } ) ;
21+ test ( "should return false when denominator is negative" , ( ) => {
22+ expect ( isProperFraction ( 2 , - 5 ) ) . toEqual ( false ) ;
23+ } ) ;
24+ test ( "should return false when numerator is greater than denominator" , ( ) => {
25+ expect ( isProperFraction ( 4 , 2 ) ) . toEqual ( false ) ;
26+ } ) ;
27+ test ( "should return false when numerator is zero" , ( ) => {
28+ expect ( isProperFraction ( 0 , 5 ) ) . toEqual ( false ) ;
29+ } ) ;
30+ test ( "should return false when numerator equals denominator" , ( ) => {
31+ expect ( isProperFraction ( 4 , 4 ) ) . toEqual ( false ) ;
32+ } ) ;
0 commit comments