Skip to content

Commit

Permalink
Merge pull request #8 from krusty-krab/JUnitReporter
Browse files Browse the repository at this point in the history
Adding Krusty Jasmine JUnit Reporter
  • Loading branch information
johnsonw committed Jul 24, 2014
2 parents 9c59dc0 + d42f64a commit 8317c55
Show file tree
Hide file tree
Showing 4 changed files with 333 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea/
node_modules/
atlassian-ide-plugin.xml
13 changes: 7 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/* jshint node: true */
'use strict';

var miniJasmineLib = require('minijasminenode2');
var multiGlob = require('multi-glob');
var path = require('path');
var argv = require('yargs').argv;
var configFile = path.normalize(process.cwd() + '/jasmine-config.js');
var jasmineReporters = require('jasmine-reporters');
var krustyJasmineReporter = require('krusty-jasmine-reporter');

var options;
try {
Expand Down Expand Up @@ -34,11 +35,11 @@ else

function execute() {
if (argv.reportType === 'junit') {
var junitXmlReporter = new jasmineReporters.JUnitXmlReporter({
savePath: argv.savePath || '',
filePrefix: argv.filePrefix || ''
});
miniJasmineLib.addReporter(junitXmlReporter);
options.JUnitReportSavePath = argv.JUnitReportSavePath || options.JUnitReportSavePath || './';
options.JUnitReportFilePrefix = argv.JUnitReportFilePrefix || options.JUnitReportFilePrefix || 'results';
options.JUnitReportSuiteName = argv.JUnitReportSuiteName || options.JUnitReportSuiteName || 'Tests';
options.JUnitReportPackageName = argv.JUnitReportPackageName || options.JUnitReportPackageName || 'Tests';
miniJasmineLib.addReporter(new krustyJasmineReporter.KrustyJasmineJUnitReporter(options));
}

miniJasmineLib.executeSpecs(options);
Expand Down
320 changes: 320 additions & 0 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minijasminenodewrap",
"version": "0.0.5",
"version": "1.0.0",
"description": "Wraps minijasminenode to allow globbing from options and the CLI",
"main": "index.js",
"bin": {
Expand Down Expand Up @@ -34,9 +34,9 @@
"license": "MIT",
"dependencies": {
"istanbul": "0.2.12",
"krusty-jasmine-reporter": "0.0.1",
"minijasminenode2": "1.0.0",
"multi-glob": "0.4.0",
"yargs": "1.2.5",
"jasmine-reporters": "2.0.0"
"yargs": "1.2.5"
}
}

0 comments on commit 8317c55

Please sign in to comment.