Skip to content

Commit 6d7444b

Browse files
committed
fully updated
1 parent 9f5d483 commit 6d7444b

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const test = require('../RPS.js');
2+
3+
test("returns 'TIE!' if P1 = P2", function(){
4+
let output = test.whoWon(player1,player2);
5+
expect(output).toBe("TIE!");
6+
});
7+
8+
test("returns 'Player 2 wins!' if P1 = rock & P2 = paper", function(){
9+
let output = test.whoWon('rock','paper');
10+
expect(output).toBe("Player 2 wins!");
11+
});
12+
13+
test("returns 'Player 2 wins!' if P1 = scissors & P2 = rock", function(){
14+
let output = test.whoWon('scissors','rock');
15+
expect(output).toBe("Player 2 wins!");
16+
});
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const test = require('../checkFive.js');
2+
3+
describe("checkFive", function(){
4+
5+
test("should produces the correct output when passed a number less than 5.", function() {
6+
let output = checkFive(2);
7+
expect(output).toBe("2 is less than 5.");
8+
});
9+
10+
});

0 commit comments

Comments
 (0)