Skip to content

Commit

Permalink
Added variable comparison in branchs - killed mutant on line 90
Browse files Browse the repository at this point in the history
  • Loading branch information
JCake committed Mar 10, 2024
1 parent c1e7877 commit 69a057a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion reports/mutation/mutation.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions test/branchStatementTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ describe('branches', function() {
it('should function with if, if else, and else statements', function(done) {
doTest('branches/03_if-elseif-else-statements', done);
});
it('should function with if and else statements with variable expressions', function(done) {
doTest('branches/04_if-else-statements-with-variable-expressions', done);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
IT'S SHOWTIME
HEY CHRISTMAS TREE a
YOU SET US UP 10
HEY CHRISTMAS TREE b
YOU SET US UP 5
GET TO THE CHOPPER result
HERE IS MY INVITATION a
LET OFF SOME STEAM BENNET b
ENOUGH TALK
BECAUSE I'M GOING TO SAY PLEASE result
TALK TO THE HAND "a is greater b"
BULLSHIT
TALK TO THE HAND "b is greater than or equal to a"
YOU HAVE NO RESPECT FOR LOGIC
YOU HAVE BEEN TERMINATED
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function() {
"use strict";
(function() {
var a = 10;
var b = 5;
if (a > b) {
console.log("a is greater b");
} else {
console.log("b is greater than or equal to a")
}
}());
}());

0 comments on commit 69a057a

Please sign in to comment.