@@ -8,3 +8,27 @@ 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 numerator is zero' , ( ) => {
12+ expect ( isProperFraction ( 0 , 1 ) ) . toEqual ( false ) ;
13+ } ) ;
14+ test ( 'should return false when both numerator and denominator are zero' , ( ) => {
15+ expect ( isProperFraction ( 0 , 0 ) ) . toEqual ( false ) ;
16+ } ) ;
17+ test ( 'should return false when numerator is negative' , ( ) => {
18+ expect ( isProperFraction ( - 1 , 2 ) ) . toEqual ( false ) ;
19+ } ) ;
20+ test ( 'should return false when denominator is negative' , ( ) => {
21+ expect ( isProperFraction ( 1 , - 2 ) ) . toEqual ( false ) ;
22+ } ) ;
23+ test ( 'should return false when both numerator and denominator are negative' , ( ) => {
24+ expect ( isProperFraction ( - 1 , - 2 ) ) . toEqual ( false ) ;
25+ } ) ;
26+ test ( 'should return true if numerator is less than denominator and both are positive' , ( ) => {
27+ expect ( isProperFraction ( 1 , 2 ) ) . toEqual ( true ) ;
28+ } ) ;
29+ test ( 'should return false if numerator is greater than denominator and both are positive' , ( ) => {
30+ expect ( isProperFraction ( 2 , 1 ) ) . toEqual ( false ) ;
31+ } ) ;
32+ test ( 'should return false if numerator is equal to denominator and both are positive' , ( ) => {
33+ expect ( isProperFraction ( 1 , 1 ) ) . toEqual ( false ) ;
34+ } ) ;
0 commit comments