Skip to content

Commit 25fc120

Browse files
committed
get proper fraction file update
1 parent 9a8f076 commit 25fc120

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@
1212

1313
function isProperFraction(numerator, denominator) {
1414
// TODO: Implement this function
15+
if (numerator < denominator){
16+
return true;
17+
}
18+
else{
19+
return false;
20+
}
1521
}
16-
22+
// console.log(isProperFraction(10,22))
1723
// The line below allows us to load the isProperFraction function into tests in other files.
1824
// This will be useful in the "rewrite tests with jest" step.
1925
module.exports = isProperFraction;
@@ -31,3 +37,7 @@ function assertEquals(actualOutput, targetOutput) {
3137

3238
// Example: 1/2 is a proper fraction
3339
assertEquals(isProperFraction(1, 2), true);
40+
assertEquals(isProperFraction(10,20), true);
41+
assertEquals(isProperFraction(80, 10), false);
42+
assertEquals(isProperFraction(8, 16), true);
43+
assertEquals(isProperFraction(10, 2), false);

0 commit comments

Comments
 (0)