Skip to content

Commit b07437b

Browse files
committed
created testcases for proper-fractions, cases tested and passed.
1 parent 6fe6458 commit b07437b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,22 @@ test("should return true for a proper fraction", () => {
77
});
88

99
// Case 2: Identify Improper Fractions:
10+
test("should return false for an improper fraction", () => {
11+
expect(isProperFraction(5, 3)).toEqual(false);
12+
});
1013

1114
// Case 3: Identify Negative Fractions:
15+
test("should return false for a negative fraction", () => {
16+
expect(isProperFraction(-2, 3)).toEqual(false);
17+
});
1218

1319
// Case 4: Identify Equal Numerator and Denominator:
20+
test("should return false for equal numerator and denominator", () => {
21+
expect(isProperFraction(4, 4)).toEqual(false);
22+
});
23+
24+
// We can run this test file using the command `npx jest 1-get-angle-type.test.js`
25+
// in the terminal. Making sure we are in the directory where this file is located.
26+
// If we have Jest installed globally, you can simply run `jest 1-get-angle-type.test.js`
27+
// instead. If you have added a test script to your package.json file, you can also run
28+
// `npm test 1-get-angle-type.test.js` to execute the tests.

0 commit comments

Comments
 (0)