Skip to content

Commit c10295e

Browse files
committed
added export functions and passed all the tests
1 parent 66ddc36 commit c10295e

6 files changed

Lines changed: 11 additions & 0 deletions

File tree

Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ function getAngleType(angle) {
1515
}
1616
}
1717

18+
module.exports = getAngleType;
19+
1820
function assertEquals(actualOutput, targetOutput) {
1921
console.assert(
2022
actualOutput === targetOutput,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ function isProperFraction(numerator, denominator) {
33
return Math.abs(numerator) < Math.abs(denominator);
44
}
55

6+
module.exports = isProperFraction;
7+
68
function assertEquals(actualOutput, targetOutput) {
79
console.assert(
810
actualOutput === targetOutput,

Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ function getCardValue(card) {
5050
return values[rank];
5151
}
5252

53+
module.exports = getCardValue;
54+
5355
function assertEquals(actualOutput, targetOutput) {
5456
console.assert(
5557
actualOutput === targetOutput,

Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const getAngleType = require("../implement/1-get-angle-type");
2+
13

24
// Case 1: Acute angles
35
test('should return "Acute angle" when (0 < angle < 90)', () => {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const isProperFraction = require("../implement/2-is-proper-fraction");
2+
13
// Special case: denominator is zero
24
test("should return false when denominator is zero", () => {
35
expect(isProperFraction(1, 0)).toEqual(false);

Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/3-get-card-value.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const getCardValue = require("../implement/3-get-card-value");
12

23
// Case 1: Ace (A)
34
test("should return 11 when given an ace card", () => {

0 commit comments

Comments
 (0)