Skip to content

Commit eadee39

Browse files
author
Edward King
committed
Working on Exercises
1 parent c97ecb6 commit eadee39

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

unit-testing/exercises/checkFive.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ function checkFive(num){
88
result = num + " is greater than 5.";
99
}
1010
return result;
11-
}
11+
}
12+
13+
module.exports = checkFive;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const checkFive = require('../checkFive.js')
2+
3+
describe("checkFive", function(){
4+
5+
test("Checking to see if given number is less than 5, this number is less than 5", function() {
6+
//code here...
7+
let output = checkFive(2);
8+
expect(output).toBe("2 is less than 5.");
9+
});
10+
11+
test("Checking to see if given number is greater than 5, this number is greater than 5", function() {
12+
//code here...
13+
let output = checkFive(8);
14+
expect(output).toBe("8 is greater than 5.");
15+
16+
});
17+
18+
test("Checking to see if given number is equal than 5, this number is equal to 5", function() {
19+
//code here...
20+
let output = checkFive(5);
21+
expect(output).toBe("5 is equal to 5.");
22+
23+
});
24+
25+
});

0 commit comments

Comments
 (0)