Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added successRate option #422

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ See the [Compatiblity and Feature List](https://github.com/alex-seville/blanket/
1. `git clone [email protected]:alex-seville/blanket.git`
2. `npm install`
3. Add your custom build details to the grunt.js file under `concat`
3. `grunt buildit`
3. `grunt build`

A minified and unminfied copy of the source can be created (see the `min` task).

Expand Down
3 changes: 2 additions & 1 deletion src/blanket.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ var parseAndModify = (inBrowser ? window.falafel : require("falafel"));
testReadyCallback:null,
commonJS:false,
instrumentCache:false,
modulePattern: null
modulePattern: null,
successRate: 60
};

if (inBrowser && typeof window.blanket !== 'undefined'){
Expand Down
6 changes: 6 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
newOptions.instrumentCache = true;
}
}
if (es.nodeName === "data-cover-successRate") {
var successRate = +es.nodeValue;
if (successRate) {
newOptions.successRate = successRate;
}
}
});
blanket.options(newOptions);

Expand Down
2 changes: 1 addition & 1 deletion src/qunit/reporter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
blanket.defaultReporter = function(coverage){
var cssSytle = "#blanket-main {margin:2px;background:#EEE;color:#333;clear:both;font-family:'Helvetica Neue Light', 'HelveticaNeue-Light', 'Helvetica Neue', Calibri, Helvetica, Arial, sans-serif; font-size:17px;} #blanket-main a {color:#333;text-decoration:none;} #blanket-main a:hover {text-decoration:underline;} .blanket {margin:0;padding:5px;clear:both;border-bottom: 1px solid #FFFFFF;} .bl-error {color:red;}.bl-success {color:#5E7D00;} .bl-file{width:auto;} .bl-cl{float:left;} .blanket div.rs {margin-left:50px; width:150px; float:right} .bl-nb {padding-right:10px;} #blanket-main a.bl-logo {color: #EB1764;cursor: pointer;font-weight: bold;text-decoration: none} .bl-source{ overflow-x:scroll; background-color: #FFFFFF; border: 1px solid #CBCBCB; color: #363636; margin: 25px 20px; width: 80%;} .bl-source div{white-space: pre;font-family: monospace;} .bl-source > div > span:first-child{background-color: #EAEAEA;color: #949494;display: inline-block;padding: 0 10px;text-align: center;width: 30px;} .bl-source .miss{background-color:#e6c3c7} .bl-source span.branchWarning{color:#000;background-color:yellow;} .bl-source span.branchOkay{color:#000;background-color:transparent;}",
successRate = 60,
successRate = blanket.options("successRate"),
head = document.head,
fileNumber = 0,
body = document.body,
Expand Down