Skip to content

Commit 5b8ba78

Browse files
committed
written functions and test successful for success fraction
1 parent 70fd5b5 commit 5b8ba78

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import test from "node:test";
88

99
test("Basic proper fraction", () => {
1010
// Example: 1/2 is a proper fraction
11-
assert.equal(isProperFraction(1, 2), true);
11+
assert.equal(isProperFraction(1, 2), "true");
1212
});
1313

1414
test("Basic proper fraction", () => {
15-
assert.equal(isProperFraction(3, 2), false);
15+
assert.equal(isProperFraction(3, 2), "false");
1616
});

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
// execute the code to ensure all tests pass.
1515

1616
export function isProperFraction(numerator, denominator) {
17-
// TODO: Implement this function
17+
if (numerator < denominator) {
18+
return "true";
19+
} return "false";
1820
}
1921

2022

0 commit comments

Comments
 (0)