Skip to content

Commit

Permalink
FIX: Make tests to pass for #23
Browse files Browse the repository at this point in the history
  • Loading branch information
royriojas committed Mar 23, 2018
1 parent 414db03 commit 68de47b
Show file tree
Hide file tree
Showing 4 changed files with 352 additions and 345 deletions.
22 changes: 11 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,17 @@ module.exports = function(results) {

if (total > 0) {
output += chalk[summaryColor].bold([
'✘ ',
total,
pluralize(' problem', total),
' (',
errors,
pluralize(' error', errors),
', ',
warnings,
pluralize(' warning', warnings),
')'
].join('')) + chalk.white('\n');
'✘ ',
total,
pluralize(' problem', total),
' (',
errors,
pluralize(' error', errors),
', ',
warnings,
pluralize(' warning', warnings),
')'
].join('')) + chalk.white('\n');

if (errors > 0) {
output += printSummary(errorsHash, 'Errors', 'red');
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"lint-fix": "npm run beautify && npm run eslint -- --fix",
"lint": "npm run beautify-check && npm run eslint",
"test": "npm run lint && FORCE_ITERM_HINT=true mocha-runner 'test/specs/**/*.js'",
"test:update": "CHAI_JEST_SNAPSHOT_UPDATE_ALL=true npm test",
"cover": "istanbul cover -x 'test/specs/**/*.js' mocha-runner 'test/specs/**/*.js' html text-summary",
"watch": "npm run cover && watch-spawn -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary",
"check": "npm run beautify-check && npm run eslint",
Expand Down Expand Up @@ -50,7 +51,7 @@
"npm run verify"
],
"devDependencies": {
"chai-jest-snapshot": "0.3.0",
"chai-jest-snapshot": "2.0.0",
"changelogx": "^1.0.18",
"esbeautifier": "10.1.1",
"eslint": "^2.10.2",
Expand Down
4 changes: 4 additions & 0 deletions test/specs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ var proxyquire = require('proxyquire');

chai.use(chaiJestSnapshot);

before(function() {
chaiJestSnapshot.resetSnapshotRegistry();
});

beforeEach(function() {
chaiJestSnapshot.configureUsingMochaContext(this);
});
Expand Down
Loading

0 comments on commit 68de47b

Please sign in to comment.