Skip to content

Commit

Permalink
Merge pull request #8 from adamgruber/develop
Browse files Browse the repository at this point in the history
1.1.1
  • Loading branch information
adamgruber committed Mar 17, 2015
2 parents c038cd9 + f90ae99 commit 6249943
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 8 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#Changelog

###1.1.1
- Add filter icon in summary for better visibility (Completely new idea and not at all in response to [this](https://github.com/adamgruber/mochawesome/issues/5))
- Change util.print to console.log due to [deprecation](https://github.com/joyent/node/blob/master/doc/api/util.markdown#user-content-utilprint)

###1.1.0
- Add support for options
- custom report directory
Expand Down
2 changes: 1 addition & 1 deletion dist/css/mochawesome.css

Large diffs are not rendered by default.

Binary file modified dist/fonts/mochawesome.eot
Binary file not shown.
1 change: 1 addition & 0 deletions dist/fonts/mochawesome.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dist/fonts/mochawesome.ttf
Binary file not shown.
Binary file modified dist/fonts/mochawesome.woff
Binary file not shown.
5 changes: 2 additions & 3 deletions lib/mochawesome.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*jshint loopfunc: true */
var util = require('util'),
mocha = require('mocha'),
var mocha = require('mocha'),
_ = require('lodash'),
uuid = require('node-uuid'),
chalk = require('chalk'),
Expand Down Expand Up @@ -107,7 +106,7 @@ function Mochawesome (runner, options) {

saveToFile(stringify(obj, null, 2), config.reportJsonFile, function(){});
saveToFile(templates.mochawesome(obj), config.reportHtmlFile, function() {
util.print('\n[' + chalk.gray('mochawesome') + '] Report saved to ' + config.reportHtmlFile + '\n\n');
console.log('\n[' + chalk.gray('mochawesome') + '] Report saved to ' + config.reportHtmlFile + '\n\n');
});
}
} catch (e) { //required because thrown errors are not handled directly in the event emitter pattern and mocha does not have an "on error"
Expand Down
5 changes: 2 additions & 3 deletions lib/reportGenerator.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
var async = require('async'),
fs = require('fs'),
ncp = require('ncp'),
util = require('util'),
_ = require('lodash'),
chalk = require('chalk');

exports.generateReport = generateReport;
exports.saveToFile = saveToFile;

function generateReport (config) {
util.print('[' + chalk.gray('mochawesome') + '] Generating report files...\n');
console.log('[' + chalk.gray('mochawesome') + '] Generating report files...\n');
async.auto({
createDirs: function(callback) {
// console.log('createDirs');
Expand Down Expand Up @@ -78,7 +77,7 @@ function saveToFile (data, outFile, callback) {
fs.close(writeFile);
callback(null, outFile);
} catch (err) {
util.print('\n[' + chalk.gray('mochawesome') + '] Error: Unable to save ' + outFile + '\n' + err + '\n');
console.log('\n[' + chalk.gray('mochawesome') + '] Error: Unable to save ' + outFile + '\n' + err + '\n');
callback(err);
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mochawesome",
"version": "1.1.0",
"version": "1.1.1",
"description": "A Gorgeous HTML/CSS Reporter for Mocha.js",
"scripts": {
"test": "gulp build"
Expand Down
Binary file modified src/fonts/mochawesome.eot
Binary file not shown.
1 change: 1 addition & 0 deletions src/fonts/mochawesome.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/fonts/mochawesome.ttf
Binary file not shown.
Binary file modified src/fonts/mochawesome.woff
Binary file not shown.
5 changes: 5 additions & 0 deletions src/less/_mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@
&:before {
content: @icon;
}
}
.fontIcon(@icon; after) {
&:after {
content: @icon;
}
}
5 changes: 5 additions & 0 deletions src/less/_mochawesome-font.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
@ma-icon-tests-alt: 'j';
@ma-icon-duration: 'h';
@ma-icon-right-chevron: 'i';
@ma-icon-filter: 'k';

[data-icon],
[class^="icon-"],
Expand Down Expand Up @@ -83,4 +84,8 @@
.icon-skipped,
[data-icon="skipped"] {
&:before { content: @ma-icon-skipped; }
}
.icon-filter,
[data-icon="filter"] {
&:before { content: @ma-icon-filter; }
}
9 changes: 9 additions & 0 deletions src/less/_summary.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.summaryLink(@color) {
@color-dark: darken(@color, 11%);
.summary-label,
.summary-label:after,
.summary-count {
.linkTransition();

Expand Down Expand Up @@ -141,5 +142,13 @@
}
.summary-label {
display: inline-block;
[data-filter] & {
.fontIcon(@ma-icon-filter; after);
&:after {
.ma-icon();
color: #ccc;
top: 2px;
}
}
}
}

0 comments on commit 6249943

Please sign in to comment.