Skip to content

Commit f476b9f

Browse files
code work for basic test
1 parent 27a2d6b commit f476b9f

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎implement-and-rewrite-tests/implement-tests-with-node-test/2-is-proper-fraction.test.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ test("Basic proper fraction", () => {
1010
// Example: 1/2 is a proper fraction
1111
assert.equal(isProperFraction(1, 2), true);
1212
});
13+
14+
test("improper fraction", () => {
15+
// Example: 1/2 is a proper fraction
16+
assert.equal(isProperFraction(2, 1), false);
17+
});

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@
1515

1616
export function isProperFraction(numerator, denominator) {
1717
// TODO: Implement this function
18+
if (numerator < denominator) {
19+
return true;
20+
}
21+
return false;
1822
}

0 commit comments

Comments
 (0)