Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from odecee/feature/update-testUnit-to-multi-…
…test-framework feat(testUnit): add test-framework support and use nyc for Node projects
- Loading branch information
Showing
34 changed files
with
256 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ log/ | |
.idea | ||
website/ | ||
*.log | ||
devlog.md | ||
.nyc_output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"check-coverage": true, | ||
"per-file": false, | ||
"statements": 75, | ||
"branches": 65, | ||
"functions": 75, | ||
"lines": 75, | ||
"include": [ | ||
"lib/**/*.js" | ||
], | ||
"exclude": [ | ||
"test/**/*.spec.js", | ||
"lib/**/templates/*" | ||
], | ||
"reporter": [ | ||
"lcovonly", | ||
"html", | ||
"text", | ||
"cobertura", | ||
"json" | ||
], | ||
"cache": true, | ||
"all": true, | ||
"report-dir": "./reports/coverage/" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"reporterEnabled": "list, mocha-junit-reporter", | ||
"mochaJunitReporterReporterOptions": { | ||
"mochaFile": "reports/junit.xml" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<%= paths.input.unitTestDir %>**/*.spec.js | ||
--reporter list | ||
--reporter mocha-multi-reporters | ||
--reporter-options configFile=<%- paths.config.configDir + resources.testUnit.configSubDir %>reporters.json | ||
--no-timeouts | ||
--ui bdd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"check-coverage": true, | ||
"per-file": true, | ||
"lines": 40, | ||
"statements": 40, | ||
"functions": 20, | ||
"branches": 50, | ||
"include": [ | ||
"<%- paths.input.srcDir %>**/*.js" | ||
], | ||
"exclude": [ | ||
"<%- paths.input.unitTestDir %>**/*.spec.js" | ||
], | ||
"reporter": [ | ||
"lcovonly", | ||
"html", | ||
"text", | ||
"cobertura", | ||
"json" | ||
], | ||
"cache": true, | ||
"all": true, | ||
"report-dir": "./<%- paths.output.reportDir + resources.testUnit.coverageReportSubDir %>" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"reporterEnabled": "list, mocha-junit-reporter", | ||
"mochaJunitReporterReporterOptions": { | ||
"mochaFile": "<%- paths.output.reportDir %>junit.xml" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
exports.getPlugins = (testFramework) => { | ||
const plugins = [ | ||
'karma-chrome-launcher', | ||
'karma-coverage', | ||
'karma-remap-coverage', | ||
'karma-sourcemap-loader', | ||
'karma-webpack' | ||
]; | ||
|
||
const frameworkPlugins = { | ||
mocha: [ | ||
...plugins, | ||
'karma-mocha', | ||
'karma-chai', | ||
'karma-sinon' | ||
], | ||
jasmine: [...plugins, 'karma-jasmine'] | ||
}; | ||
|
||
return frameworkPlugins[testFramework]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.