diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 000000000..940e2c2d8
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,15 @@
+module.exports = {
+ env: {
+ browser: true,
+ commonjs: true,
+ es2021: true,
+ },
+ extends: 'airbnb-base',
+ overrides: [
+ ],
+ parserOptions: {
+ ecmaVersion: 'latest',
+ },
+ rules: {
+ },
+};
diff --git a/README.md b/README.md
index ae8571b52..08e8f1be9 100644
--- a/README.md
+++ b/README.md
@@ -1,91 +1,58 @@
+# Makers Academy Bowling Challenge (Javascript)
-Bowling Challenge
-=================
-
-* Feel free to use google, your notes, books, etc. but work on your own
-* If you refer to the solution of another coach or student, please put a link to that in your README
-* If you have a partial solution, **still check in a partial solution**
-* You must submit a pull request to this repo with your code by 9am Monday week
+A weekend challenge as part of the Makers Academy bootcamp, undertaken in Javascript after [attempting the same problem in Ruby](https://github.com/tomcarmichael/bowling-challenge-ruby.git) first.
## The Task
-**THIS IS NOT A BOWLING GAME, IT IS A BOWLING SCORECARD. DO NOT GENERATE RANDOM ROLLS. AN ACTUAL USER INTERFACE IS OPTIONAL**
-
-Count and sum the scores of a bowling game for one player (in JavaScript).
-
-A bowling game consists of 10 frames in which the player tries to knock down the 10 pins. In every frame the player can roll one or two times. The actual number depends on strikes and spares. The score of a frame is the number of knocked down pins plus bonuses for strikes and spares. After every frame the 10 pins are reset.
-
-Start by looking in detail at the rules and the example of scoring for a complete game given below.
-
-An example of how your code might be used could be:
-
-```javaScript
-let scorecard = new Scorecard()
-scorecard.calculateScore() // returns 0
-scorecard.addFrame(2, 5)
-scorecard.addFrame(3, 5)
-scorecard.calculateScore() // returns 15
-```
-
-But feel free to add other methods if you think they are useful.
-
-As usual please start by
-
-* Forking this repo
-
-* Using test-driven development (if you decide to write a user interface, then make sure you have looked at the chapters on mocking).
+The brief was defined in the README of the [Makers Academy repo](https://github.com/makersacademy/bowling-challenge) that I forked to begin this challenge.
-* Finally submit a pull request before Monday week at 9am with your solution or partial solution. However much or little amount of code you wrote please please please submit a pull request before Monday week at 9am.
+Key points:
-___STRONG HINT, IGNORE AT YOUR PERIL:___ Bowling is a deceptively complex game. Careful thought and thorough diagramming — both before and throughout — will save you literal hours of your life.
+>**THIS IS NOT A BOWLING GAME, IT IS A BOWLING SCORECARD. DO NOT GENERATE RANDOM ROLLS. AN ACTUAL USER INTERFACE IS OPTIONAL**
-### Optional Extras
+>Count and sum the scores of a bowling game for one player (in JavaScript).
-In any order you like:
+>More about ten pin bowling here: http://en.wikipedia.org/wiki/Ten-pin_bowling
-* Set up [Travis CI](https://travis-ci.org) to run your tests.
-* Add [ESLint](http://eslint.org/) to your codebase and make your code conform.
-* Create a UserInterface class, allowing you to run a game from the command line.
+## Getting started
-You might even want to start with ESLint early on in your work — to help you
-learn Javascript conventions as you go along.
+`git clone https://github.com/tomcarmichael/bowling-challenge.git`
-## Bowling — how does it work?
+Install dependencies: `npm install`
-### Strikes
+## Usage
-The player has a strike if he knocks down all 10 pins with the first roll in a frame. The frame ends immediately (since there are no pins left for a second roll). The bonus for that frame is the number of pins knocked down by the next two rolls. That would be the next frame, unless the player rolls another strike.
+The program is designed to be used in the context of the Node REPL, having been created solely as a learning exercise.
-### Spares
+In the terminal, run:
-The player has a spare if the knocks down all 10 pins with the two rolls of a frame. The bonus for that frame is the number of pins knocked down by the next roll (first roll of next frame).
+`node`
-### 10th frame
+`const Game = require('./game')`
-If the player rolls a strike or spare in the 10th frame they can roll the additional balls for the bonus. But they can never roll more than 3 balls in the 10th frame. The additional rolls only count for the bonus not for the regular frame count.
+`const game = new Game()`
- 10, 10, 10 in the 10th frame gives 30 points (10 points for the regular first strike and 20 points for the bonus).
- 1, 9, 10 in the 10th frame gives 20 points (10 points for the regular spare and 10 points for the bonus).
+Define a 2D array of valid scores for a bowling game (each frame is an array) e.g.
-### Gutter Game
+`const scores = [[1, 4], [4, 5], [6, 4], [5, 5], [10], [0, 1], [7, 3], [6, 4], [10], [2, 7]]`
-A Gutter Game is when the player never hits a pin (20 zero scores).
+`game.play(scores)`
-### Perfect Game
+See the total score for the game:
-A Perfect Game is when the player rolls 12 strikes (10 regular strikes and 2 strikes for the bonus in the 10th frame). The Perfect Game scores 300 points.
+`game.grandTotal`
-In the image below you can find some score examples.
+Check if the game is a perfect game or gutter game:
-More about ten pin bowling here: http://en.wikipedia.org/wiki/Ten-pin_bowling
+`game.isGutterGame()` , `game.isPerfectGame()`
-![Ten Pin Score Example](images/example_ten_pin_scoring.png)
+## Running Tests
-## Code Review
+`jest`
-In code review we'll be hoping to see:
+![bowling-challenge-jest](./screenshots/bowling-challenge-jest.png)
+![bowling-challenge-node](./screenshots/bowling-challenge-node.png)
-* All tests passing
-* The code is elegant: every class has a clear responsibility, methods are short etc.
+## Reflections
-Reviewers will potentially be using this [code review rubric](docs/review.md). Note that referring to this rubric in advance may make the challenge somewhat easier. You should be the judge of how much challenge you want.
+This challenge was completed after one week of learning Javascript, following on from completing [the same challenge in Ruby](https://github.com/tomcarmichael/bowling-challenge-ruby). Although I did not implement a UI via the command line in this Javascript version, I tried to design and write the program in a way that would make it easily extendable for such a feature. A key goal for me was to write the program in such a way that scores were updated as soon as possible, during the game (as they would be in a bowling alley) something made more complex by the rules around bonus points for strikes and spares which are based on the scores in the subsequent frames. In the Ruby version of the challenge, scores were calculated at the end of the game only, and the user interface code was not sufficiently separated from the rest of the game logic. In this version of the program, I feel I was able to improve on both of those problems.
diff --git a/coverage/clover.xml b/coverage/clover.xml
new file mode 100644
index 000000000..92db28cf5
--- /dev/null
+++ b/coverage/clover.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json
new file mode 100644
index 000000000..a591f860a
--- /dev/null
+++ b/coverage/coverage-final.json
@@ -0,0 +1,3 @@
+{"/Users/tomcarmichael/Documents/code/js/bowling-challenge/frame.js": {"path":"/Users/tomcarmichael/Documents/code/js/bowling-challenge/frame.js","statementMap":{"0":{"start":{"line":3,"column":4},"end":{"line":3,"column":20}},"1":{"start":{"line":4,"column":4},"end":{"line":4,"column":27}},"2":{"start":{"line":5,"column":4},"end":{"line":5,"column":25}},"3":{"start":{"line":9,"column":4},"end":{"line":16,"column":5}},"4":{"start":{"line":10,"column":6},"end":{"line":10,"column":77}},"5":{"start":{"line":11,"column":11},"end":{"line":16,"column":5}},"6":{"start":{"line":12,"column":6},"end":{"line":12,"column":118}},"7":{"start":{"line":14,"column":6},"end":{"line":14,"column":30}},"8":{"start":{"line":15,"column":6},"end":{"line":15,"column":35}},"9":{"start":{"line":20,"column":4},"end":{"line":22,"column":7}},"10":{"start":{"line":21,"column":6},"end":{"line":21,"column":24}},"11":{"start":{"line":26,"column":4},"end":{"line":26,"column":31}},"12":{"start":{"line":30,"column":4},"end":{"line":30,"column":62}},"13":{"start":{"line":33,"column":0},"end":{"line":33,"column":23}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":2},"end":{"line":2,"column":3}},"loc":{"start":{"line":2,"column":16},"end":{"line":6,"column":3}},"line":2},"1":{"name":"(anonymous_1)","decl":{"start":{"line":8,"column":2},"end":{"line":8,"column":3}},"loc":{"start":{"line":8,"column":15},"end":{"line":17,"column":3}},"line":8},"2":{"name":"(anonymous_2)","decl":{"start":{"line":19,"column":2},"end":{"line":19,"column":3}},"loc":{"start":{"line":19,"column":21},"end":{"line":23,"column":3}},"line":19},"3":{"name":"(anonymous_3)","decl":{"start":{"line":20,"column":25},"end":{"line":20,"column":26}},"loc":{"start":{"line":20,"column":37},"end":{"line":22,"column":5}},"line":20},"4":{"name":"(anonymous_4)","decl":{"start":{"line":25,"column":2},"end":{"line":25,"column":3}},"loc":{"start":{"line":25,"column":13},"end":{"line":27,"column":3}},"line":25},"5":{"name":"(anonymous_5)","decl":{"start":{"line":29,"column":2},"end":{"line":29,"column":3}},"loc":{"start":{"line":29,"column":12},"end":{"line":31,"column":3}},"line":29}},"branchMap":{"0":{"loc":{"start":{"line":9,"column":4},"end":{"line":16,"column":5}},"type":"if","locations":[{"start":{"line":9,"column":4},"end":{"line":16,"column":5}},{"start":{"line":11,"column":11},"end":{"line":16,"column":5}}],"line":9},"1":{"loc":{"start":{"line":9,"column":8},"end":{"line":9,"column":53}},"type":"binary-expr","locations":[{"start":{"line":9,"column":8},"end":{"line":9,"column":30}},{"start":{"line":9,"column":34},"end":{"line":9,"column":53}}],"line":9},"2":{"loc":{"start":{"line":11,"column":11},"end":{"line":16,"column":5}},"type":"if","locations":[{"start":{"line":11,"column":11},"end":{"line":16,"column":5}},{"start":{"line":13,"column":11},"end":{"line":16,"column":5}}],"line":11},"3":{"loc":{"start":{"line":30,"column":11},"end":{"line":30,"column":61}},"type":"binary-expr","locations":[{"start":{"line":30,"column":11},"end":{"line":30,"column":35}},{"start":{"line":30,"column":39},"end":{"line":30,"column":61}}],"line":30}},"s":{"0":122,"1":122,"2":122,"3":195,"4":2,"5":193,"6":1,"7":192,"8":192,"9":116,"10":186,"11":148,"12":110,"13":3},"f":{"0":122,"1":195,"2":116,"3":186,"4":148,"5":110},"b":{"0":[2,193],"1":[195,194],"2":[1,192],"3":[110,56]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"6e62ee9ac60cb9c104cd0f69ac7db85ec9446659"}
+,"/Users/tomcarmichael/Documents/code/js/bowling-challenge/game.js": {"path":"/Users/tomcarmichael/Documents/code/js/bowling-challenge/game.js","statementMap":{"0":{"start":{"line":1,"column":14},"end":{"line":1,"column":32}},"1":{"start":{"line":5,"column":4},"end":{"line":5,"column":24}},"2":{"start":{"line":6,"column":4},"end":{"line":6,"column":21}},"3":{"start":{"line":7,"column":4},"end":{"line":7,"column":33}},"4":{"start":{"line":8,"column":4},"end":{"line":8,"column":28}},"5":{"start":{"line":12,"column":4},"end":{"line":15,"column":5}},"6":{"start":{"line":12,"column":16},"end":{"line":12,"column":17}},"7":{"start":{"line":13,"column":18},"end":{"line":13,"column":39}},"8":{"start":{"line":14,"column":6},"end":{"line":14,"column":30}},"9":{"start":{"line":19,"column":4},"end":{"line":23,"column":6}},"10":{"start":{"line":21,"column":6},"end":{"line":21,"column":33}},"11":{"start":{"line":22,"column":6},"end":{"line":22,"column":48}},"12":{"start":{"line":22,"column":19},"end":{"line":22,"column":46}},"13":{"start":{"line":24,"column":21},"end":{"line":24,"column":35}},"14":{"start":{"line":25,"column":4},"end":{"line":28,"column":5}},"15":{"start":{"line":27,"column":6},"end":{"line":27,"column":53}},"16":{"start":{"line":29,"column":4},"end":{"line":29,"column":31}},"17":{"start":{"line":33,"column":23},"end":{"line":33,"column":41}},"18":{"start":{"line":34,"column":24},"end":{"line":34,"column":44}},"19":{"start":{"line":35,"column":26},"end":{"line":35,"column":46}},"20":{"start":{"line":37,"column":4},"end":{"line":45,"column":5}},"21":{"start":{"line":38,"column":6},"end":{"line":38,"column":57}},"22":{"start":{"line":39,"column":11},"end":{"line":45,"column":5}},"23":{"start":{"line":40,"column":6},"end":{"line":40,"column":62}},"24":{"start":{"line":42,"column":6},"end":{"line":44,"column":7}},"25":{"start":{"line":43,"column":8},"end":{"line":43,"column":60}},"26":{"start":{"line":49,"column":21},"end":{"line":49,"column":35}},"27":{"start":{"line":50,"column":27},"end":{"line":50,"column":41}},"28":{"start":{"line":52,"column":4},"end":{"line":54,"column":7}},"29":{"start":{"line":53,"column":6},"end":{"line":53,"column":39}},"30":{"start":{"line":56,"column":4},"end":{"line":58,"column":5}},"31":{"start":{"line":57,"column":6},"end":{"line":57,"column":57}},"32":{"start":{"line":62,"column":4},"end":{"line":64,"column":7}},"33":{"start":{"line":63,"column":6},"end":{"line":63,"column":67}},"34":{"start":{"line":68,"column":4},"end":{"line":68,"column":32}},"35":{"start":{"line":72,"column":4},"end":{"line":72,"column":34}},"36":{"start":{"line":76,"column":0},"end":{"line":76,"column":22}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":4,"column":2},"end":{"line":4,"column":3}},"loc":{"start":{"line":4,"column":34},"end":{"line":9,"column":3}},"line":4},"1":{"name":"(anonymous_1)","decl":{"start":{"line":11,"column":2},"end":{"line":11,"column":3}},"loc":{"start":{"line":11,"column":21},"end":{"line":16,"column":3}},"line":11},"2":{"name":"(anonymous_2)","decl":{"start":{"line":18,"column":2},"end":{"line":18,"column":3}},"loc":{"start":{"line":18,"column":20},"end":{"line":30,"column":3}},"line":18},"3":{"name":"(anonymous_3)","decl":{"start":{"line":19,"column":24},"end":{"line":19,"column":25}},"loc":{"start":{"line":19,"column":38},"end":{"line":23,"column":5}},"line":19},"4":{"name":"(anonymous_4)","decl":{"start":{"line":32,"column":2},"end":{"line":32,"column":3}},"loc":{"start":{"line":32,"column":29},"end":{"line":46,"column":3}},"line":32},"5":{"name":"(anonymous_5)","decl":{"start":{"line":48,"column":2},"end":{"line":48,"column":3}},"loc":{"start":{"line":48,"column":44},"end":{"line":59,"column":3}},"line":48},"6":{"name":"(anonymous_6)","decl":{"start":{"line":52,"column":28},"end":{"line":52,"column":29}},"loc":{"start":{"line":52,"column":40},"end":{"line":54,"column":5}},"line":52},"7":{"name":"(anonymous_7)","decl":{"start":{"line":61,"column":2},"end":{"line":61,"column":3}},"loc":{"start":{"line":61,"column":24},"end":{"line":65,"column":3}},"line":61},"8":{"name":"(anonymous_8)","decl":{"start":{"line":62,"column":24},"end":{"line":62,"column":25}},"loc":{"start":{"line":62,"column":35},"end":{"line":64,"column":5}},"line":62},"9":{"name":"(anonymous_9)","decl":{"start":{"line":67,"column":2},"end":{"line":67,"column":3}},"loc":{"start":{"line":67,"column":17},"end":{"line":69,"column":3}},"line":67},"10":{"name":"(anonymous_10)","decl":{"start":{"line":71,"column":2},"end":{"line":71,"column":3}},"loc":{"start":{"line":71,"column":18},"end":{"line":73,"column":3}},"line":71}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":14},"end":{"line":4,"column":32}},"type":"default-arg","locations":[{"start":{"line":4,"column":27},"end":{"line":4,"column":32}}],"line":4},"1":{"loc":{"start":{"line":22,"column":6},"end":{"line":22,"column":48}},"type":"if","locations":[{"start":{"line":22,"column":6},"end":{"line":22,"column":48}},{"start":{},"end":{}}],"line":22},"2":{"loc":{"start":{"line":25,"column":4},"end":{"line":28,"column":5}},"type":"if","locations":[{"start":{"line":25,"column":4},"end":{"line":28,"column":5}},{"start":{},"end":{}}],"line":25},"3":{"loc":{"start":{"line":25,"column":8},"end":{"line":25,"column":53}},"type":"binary-expr","locations":[{"start":{"line":25,"column":8},"end":{"line":25,"column":29}},{"start":{"line":25,"column":33},"end":{"line":25,"column":53}}],"line":25},"4":{"loc":{"start":{"line":37,"column":4},"end":{"line":45,"column":5}},"type":"if","locations":[{"start":{"line":37,"column":4},"end":{"line":45,"column":5}},{"start":{"line":39,"column":11},"end":{"line":45,"column":5}}],"line":37},"5":{"loc":{"start":{"line":39,"column":11},"end":{"line":45,"column":5}},"type":"if","locations":[{"start":{"line":39,"column":11},"end":{"line":45,"column":5}},{"start":{},"end":{}}],"line":39},"6":{"loc":{"start":{"line":42,"column":6},"end":{"line":44,"column":7}},"type":"if","locations":[{"start":{"line":42,"column":6},"end":{"line":44,"column":7}},{"start":{},"end":{}}],"line":42},"7":{"loc":{"start":{"line":42,"column":10},"end":{"line":42,"column":50}},"type":"binary-expr","locations":[{"start":{"line":42,"column":10},"end":{"line":42,"column":20}},{"start":{"line":42,"column":24},"end":{"line":42,"column":50}}],"line":42},"8":{"loc":{"start":{"line":56,"column":4},"end":{"line":58,"column":5}},"type":"if","locations":[{"start":{"line":56,"column":4},"end":{"line":58,"column":5}},{"start":{},"end":{}}],"line":56},"9":{"loc":{"start":{"line":56,"column":8},"end":{"line":56,"column":60}},"type":"binary-expr","locations":[{"start":{"line":56,"column":8},"end":{"line":56,"column":29}},{"start":{"line":56,"column":33},"end":{"line":56,"column":60}}],"line":56}},"s":{"0":2,"1":15,"2":15,"3":15,"4":15,"5":15,"6":15,"7":150,"8":150,"9":13,"10":130,"11":130,"12":117,"13":13,"14":13,"15":7,"16":13,"17":117,"18":117,"19":117,"20":117,"21":13,"22":104,"23":43,"24":43,"25":32,"26":7,"27":7,"28":7,"29":10,"30":7,"31":2,"32":13,"33":130,"34":1,"35":1,"36":2},"f":{"0":15,"1":15,"2":13,"3":130,"4":117,"5":7,"6":10,"7":13,"8":130,"9":1,"10":1},"b":{"0":[0],"1":[117,13],"2":[7,6],"3":[13,10],"4":[13,104],"5":[43,61],"6":[32,11],"7":[43,38],"8":[2,5],"9":[7,3]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"e8b55ad8edaaf2ed4b56c67297f3758718e332cf"}
+}
diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css
new file mode 100644
index 000000000..f418035b4
--- /dev/null
+++ b/coverage/lcov-report/base.css
@@ -0,0 +1,224 @@
+body, html {
+ margin:0; padding: 0;
+ height: 100%;
+}
+body {
+ font-family: Helvetica Neue, Helvetica, Arial;
+ font-size: 14px;
+ color:#333;
+}
+.small { font-size: 12px; }
+*, *:after, *:before {
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ box-sizing:border-box;
+ }
+h1 { font-size: 20px; margin: 0;}
+h2 { font-size: 14px; }
+pre {
+ font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ margin: 0;
+ padding: 0;
+ -moz-tab-size: 2;
+ -o-tab-size: 2;
+ tab-size: 2;
+}
+a { color:#0074D9; text-decoration:none; }
+a:hover { text-decoration:underline; }
+.strong { font-weight: bold; }
+.space-top1 { padding: 10px 0 0 0; }
+.pad2y { padding: 20px 0; }
+.pad1y { padding: 10px 0; }
+.pad2x { padding: 0 20px; }
+.pad2 { padding: 20px; }
+.pad1 { padding: 10px; }
+.space-left2 { padding-left:55px; }
+.space-right2 { padding-right:20px; }
+.center { text-align:center; }
+.clearfix { display:block; }
+.clearfix:after {
+ content:'';
+ display:block;
+ height:0;
+ clear:both;
+ visibility:hidden;
+ }
+.fl { float: left; }
+@media only screen and (max-width:640px) {
+ .col3 { width:100%; max-width:100%; }
+ .hide-mobile { display:none!important; }
+}
+
+.quiet {
+ color: #7f7f7f;
+ color: rgba(0,0,0,0.5);
+}
+.quiet a { opacity: 0.7; }
+
+.fraction {
+ font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
+ font-size: 10px;
+ color: #555;
+ background: #E8E8E8;
+ padding: 4px 5px;
+ border-radius: 3px;
+ vertical-align: middle;
+}
+
+div.path a:link, div.path a:visited { color: #333; }
+table.coverage {
+ border-collapse: collapse;
+ margin: 10px 0 0 0;
+ padding: 0;
+}
+
+table.coverage td {
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+}
+table.coverage td.line-count {
+ text-align: right;
+ padding: 0 5px 0 20px;
+}
+table.coverage td.line-coverage {
+ text-align: right;
+ padding-right: 10px;
+ min-width:20px;
+}
+
+table.coverage td span.cline-any {
+ display: inline-block;
+ padding: 0 5px;
+ width: 100%;
+}
+.missing-if-branch {
+ display: inline-block;
+ margin-right: 5px;
+ border-radius: 3px;
+ position: relative;
+ padding: 0 4px;
+ background: #333;
+ color: yellow;
+}
+
+.skip-if-branch {
+ display: none;
+ margin-right: 10px;
+ position: relative;
+ padding: 0 4px;
+ background: #ccc;
+ color: white;
+}
+.missing-if-branch .typ, .skip-if-branch .typ {
+ color: inherit !important;
+}
+.coverage-summary {
+ border-collapse: collapse;
+ width: 100%;
+}
+.coverage-summary tr { border-bottom: 1px solid #bbb; }
+.keyline-all { border: 1px solid #ddd; }
+.coverage-summary td, .coverage-summary th { padding: 10px; }
+.coverage-summary tbody { border: 1px solid #bbb; }
+.coverage-summary td { border-right: 1px solid #bbb; }
+.coverage-summary td:last-child { border-right: none; }
+.coverage-summary th {
+ text-align: left;
+ font-weight: normal;
+ white-space: nowrap;
+}
+.coverage-summary th.file { border-right: none !important; }
+.coverage-summary th.pct { }
+.coverage-summary th.pic,
+.coverage-summary th.abs,
+.coverage-summary td.pct,
+.coverage-summary td.abs { text-align: right; }
+.coverage-summary td.file { white-space: nowrap; }
+.coverage-summary td.pic { min-width: 120px !important; }
+.coverage-summary tfoot td { }
+
+.coverage-summary .sorter {
+ height: 10px;
+ width: 7px;
+ display: inline-block;
+ margin-left: 0.5em;
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
+}
+.coverage-summary .sorted .sorter {
+ background-position: 0 -20px;
+}
+.coverage-summary .sorted-desc .sorter {
+ background-position: 0 -10px;
+}
+.status-line { height: 10px; }
+/* yellow */
+.cbranch-no { background: yellow !important; color: #111; }
+/* dark red */
+.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
+.low .chart { border:1px solid #C21F39 }
+.highlighted,
+.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
+ background: #C21F39 !important;
+}
+/* medium red */
+.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
+/* light red */
+.low, .cline-no { background:#FCE1E5 }
+/* light green */
+.high, .cline-yes { background:rgb(230,245,208) }
+/* medium green */
+.cstat-yes { background:rgb(161,215,106) }
+/* dark green */
+.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
+.high .chart { border:1px solid rgb(77,146,33) }
+/* dark yellow (gold) */
+.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
+.medium .chart { border:1px solid #f9cd0b; }
+/* light yellow */
+.medium { background: #fff4c2; }
+
+.cstat-skip { background: #ddd; color: #111; }
+.fstat-skip { background: #ddd; color: #111 !important; }
+.cbranch-skip { background: #ddd !important; color: #111; }
+
+span.cline-neutral { background: #eaeaea; }
+
+.coverage-summary td.empty {
+ opacity: .5;
+ padding-top: 4px;
+ padding-bottom: 4px;
+ line-height: 1;
+ color: #888;
+}
+
+.cover-fill, .cover-empty {
+ display:inline-block;
+ height: 12px;
+}
+.chart {
+ line-height: 0;
+}
+.cover-empty {
+ background: white;
+}
+.cover-full {
+ border-right: none !important;
+}
+pre.prettyprint {
+ border: none !important;
+ padding: 0 !important;
+ margin: 0 !important;
+}
+.com { color: #999 !important; }
+.ignore-none { color: #999; font-weight: normal; }
+
+.wrapper {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ margin: 0 auto -48px;
+}
+.footer, .push {
+ height: 48px;
+}
diff --git a/coverage/lcov-report/block-navigation.js b/coverage/lcov-report/block-navigation.js
new file mode 100644
index 000000000..cc1213023
--- /dev/null
+++ b/coverage/lcov-report/block-navigation.js
@@ -0,0 +1,87 @@
+/* eslint-disable */
+var jumpToCode = (function init() {
+ // Classes of code we would like to highlight in the file view
+ var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
+
+ // Elements to highlight in the file listing view
+ var fileListingElements = ['td.pct.low'];
+
+ // We don't want to select elements that are direct descendants of another match
+ var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
+
+ // Selecter that finds elements on the page to which we can jump
+ var selector =
+ fileListingElements.join(', ') +
+ ', ' +
+ notSelector +
+ missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
+
+ // The NodeList of matching elements
+ var missingCoverageElements = document.querySelectorAll(selector);
+
+ var currentIndex;
+
+ function toggleClass(index) {
+ missingCoverageElements
+ .item(currentIndex)
+ .classList.remove('highlighted');
+ missingCoverageElements.item(index).classList.add('highlighted');
+ }
+
+ function makeCurrent(index) {
+ toggleClass(index);
+ currentIndex = index;
+ missingCoverageElements.item(index).scrollIntoView({
+ behavior: 'smooth',
+ block: 'center',
+ inline: 'center'
+ });
+ }
+
+ function goToPrevious() {
+ var nextIndex = 0;
+ if (typeof currentIndex !== 'number' || currentIndex === 0) {
+ nextIndex = missingCoverageElements.length - 1;
+ } else if (missingCoverageElements.length > 1) {
+ nextIndex = currentIndex - 1;
+ }
+
+ makeCurrent(nextIndex);
+ }
+
+ function goToNext() {
+ var nextIndex = 0;
+
+ if (
+ typeof currentIndex === 'number' &&
+ currentIndex < missingCoverageElements.length - 1
+ ) {
+ nextIndex = currentIndex + 1;
+ }
+
+ makeCurrent(nextIndex);
+ }
+
+ return function jump(event) {
+ if (
+ document.getElementById('fileSearch') === document.activeElement &&
+ document.activeElement != null
+ ) {
+ // if we're currently focused on the search input, we don't want to navigate
+ return;
+ }
+
+ switch (event.which) {
+ case 78: // n
+ case 74: // j
+ goToNext();
+ break;
+ case 66: // b
+ case 75: // k
+ case 80: // p
+ goToPrevious();
+ break;
+ }
+ };
+})();
+window.addEventListener('keydown', jumpToCode);
diff --git a/coverage/lcov-report/favicon.png b/coverage/lcov-report/favicon.png
new file mode 100644
index 000000000..c1525b811
Binary files /dev/null and b/coverage/lcov-report/favicon.png differ
diff --git a/coverage/lcov-report/frame.js.html b/coverage/lcov-report/frame.js.html
new file mode 100644
index 000000000..9ff63bab5
--- /dev/null
+++ b/coverage/lcov-report/frame.js.html
@@ -0,0 +1,184 @@
+
+
+
+
+