@@ -8,3 +8,31 @@ 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+
12+ test ( `should return true when (numerator < denominator)` , ( ) => {
13+ expect ( isProperFraction ( 0 , 1 ) ) . toEqual ( true ) ;
14+ } )
15+
16+ test ( `should return true when (numerator < denominator)` , ( ) => {
17+ expect ( isProperFraction ( - 6 , - 3 ) ) . toEqual ( true ) ;
18+ } )
19+
20+ test ( `should return true when (numerator < denominator)` , ( ) => {
21+ expect ( isProperFraction ( 1 , 2 ) ) . toEqual ( true ) ;
22+ } )
23+
24+ test ( `should return false when (numerator > denominator)` , ( ) => {
25+ expect ( isProperFraction ( 2 , 1 ) ) . toEqual ( false ) ;
26+ } )
27+
28+ test ( `should return false when (numerator == denominator)` , ( ) => {
29+ expect ( isProperFraction ( 0 , 0 ) ) . toEqual ( false ) ;
30+ } )
31+
32+ test ( `should return false when (numerator > denominator)` , ( ) => {
33+ expect ( isProperFraction ( - 1 , - 2 ) ) . toEqual ( false ) ;
34+ } )
35+
36+ test ( `should return false when (numerator > denominator)` , ( ) => {
37+ expect ( isProperFraction ( 0 , - 1 ) ) . toEqual ( false ) ;
38+ } )
0 commit comments