Skip to content

Commit

Permalink
Else statements and coverage gets even better!
Browse files Browse the repository at this point in the history
  • Loading branch information
JCake committed Feb 11, 2024
1 parent 513687d commit f0cc5a4
Show file tree
Hide file tree
Showing 4 changed files with 21 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 @@ -4,4 +4,7 @@ describe('branches', function() {
it('should function with an if statement', function(done) {
doTest('branches/01_if-statement', done);
});
it('should function with if and else statements', function(done) {
doTest('branches/02_if-else-statements', done);
});
});
7 changes: 7 additions & 0 deletions test/fixtures/branches/02_if-else-statements.arnoldc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
IT'S SHOWTIME
BECAUSE I'M GOING TO SAY PLEASE @I LIED
TALK TO THE HAND "It's false"
BULLSHIT
TALK TO THE HAND "It's not false"
YOU HAVE NO RESPECT FOR LOGIC
YOU HAVE BEEN TERMINATED
10 changes: 10 additions & 0 deletions test/fixtures/branches/02_if-else-statements.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(function() {
"use strict";
(function() {
if (false) {
console.log("It's false");
} else {
console.log("It's not false");
}
}());
}());

0 comments on commit f0cc5a4

Please sign in to comment.