grunt-blanket-mocha
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "grunt-blanket-mocha", | ||
"description": "Headless Blanket.js code coverage and Mocha testing via PhantomJS", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/ModelN/grunt-blanket-mocha", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -140,3 +140,15 @@ # grunt-blanket-mocha | ||
#### options.excludedFiles | ||
Type: `Array` | ||
Default value: undefined | ||
List filenames that need to be excluded. This will inform the Grunt Task to not mark these files as failed. The result will be printed as, | ||
SKIP: [..%] filename | ||
Example: | ||
`excludedFiles: [ | ||
"./src/my/file1.js", | ||
"./src/my/project/file2.js" | ||
]` | ||
### Command Line Options | ||
@@ -168,2 +180,8 @@ | ||
#### excludedFiles | ||
List the files to be excluded as an array. | ||
Example, | ||
`grunt --excludedFiles=["./src/my/file1.js", "./src/my/project/file2.js"]` | ||
#### grep | ||
@@ -182,2 +200,7 @@ | ||
### 0.3.0 | ||
*Released 25 August 2013* | ||
* Add ability to manually exclude files(shows as 'skipped') | ||
### 0.2.0 | ||
@@ -184,0 +207,0 @@ *Released 1 August 2013* |
@@ -0,0 +0,0 @@ /* |
@@ -35,3 +35,3 @@ // grunt-blanket-mocha 0.2.0 | ||
var status, coverageThreshold, modulePattern, modulePatternRegex; | ||
var status, coverageThreshold, modulePattern, modulePatternRegex, excludedFiles; | ||
var totals = { | ||
@@ -60,3 +60,4 @@ totalLines: 0, | ||
var result = pass ? "PASS" : "FAIL"; | ||
//If not passed, check if file is marked for manual exclusion. Else, fail it. | ||
var result = pass ? "PASS" : ( excludedFiles.indexOf(name) === -1 /*File not found*/ ? "FAIL" : "SKIP"); | ||
@@ -78,2 +79,4 @@ var percentDisplay = Math.floor(percent); | ||
} | ||
} else if (result === "SKIP"){ //Visually mark that these have been skipped. | ||
grunt.log.writeln(msg.magenta); | ||
} else { | ||
@@ -218,2 +221,6 @@ ok = false; | ||
//Get the array of excludedFiles | ||
//Users should be able to define it in the command-line as an array or include it in the test file. | ||
excludedFiles = grunt.option('excludedFiles') || options.excludedFiles; | ||
if (grep) { | ||
@@ -414,2 +421,2 @@ options.mocha.grep = grep; | ||
}); | ||
}; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
275541
8781
212
2