File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 22// We will use the same function, but write tests for it using Jest in this file.
33const isProperFraction = require ( "../implement/2-is-proper-fraction" ) ;
44
5- test ( "should return true for a proper fraction " , ( ) => {
5+ test ( "should return true for a proper fractions " , ( ) => {
66 expect ( isProperFraction ( 2 , 3 ) ) . toEqual ( true ) ;
77} ) ;
88
99// Case 2: Identify Improper Fractions:
10+ test ( "should return false for improper fractions" , ( ) => {
11+ expect ( isProperFraction ( 7 , 3 ) ) . toEqual ( false ) ;
12+ } )
1013
1114// Case 3: Identify Negative Fractions:
15+ test ( "should return false for negative fractions" , ( ) => {
16+ expect ( isProperFraction ( - 4 , 9 ) ) . toEqual ( true ) ;
17+ } )
1218
1319// Case 4: Identify Equal Numerator and Denominator:
20+ test ( "should return false for equal numerator and denominator" , ( ) => {
21+ expect ( isProperFraction ( 3 , 3 ) ) . toEqual ( false ) ;
22+ } )
You can’t perform that action at this time.
0 commit comments