Skip to content

Commit 68de47b

Browse files
committed
FIX: Make tests to pass for #23
1 parent 414db03 commit 68de47b

4 files changed

Lines changed: 352 additions & 345 deletions

File tree

index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,17 @@ module.exports = function(results) {
223223

224224
if (total > 0) {
225225
output += chalk[summaryColor].bold([
226-
'✘ ',
227-
total,
228-
pluralize(' problem', total),
229-
' (',
230-
errors,
231-
pluralize(' error', errors),
232-
', ',
233-
warnings,
234-
pluralize(' warning', warnings),
235-
')'
236-
].join('')) + chalk.white('\n');
226+
'✘ ',
227+
total,
228+
pluralize(' problem', total),
229+
' (',
230+
errors,
231+
pluralize(' error', errors),
232+
', ',
233+
warnings,
234+
pluralize(' warning', warnings),
235+
')'
236+
].join('')) + chalk.white('\n');
237237

238238
if (errors > 0) {
239239
output += printSummary(errorsHash, 'Errors', 'red');

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"lint-fix": "npm run beautify && npm run eslint -- --fix",
2424
"lint": "npm run beautify-check && npm run eslint",
2525
"test": "npm run lint && FORCE_ITERM_HINT=true mocha-runner 'test/specs/**/*.js'",
26+
"test:update": "CHAI_JEST_SNAPSHOT_UPDATE_ALL=true npm test",
2627
"cover": "istanbul cover -x 'test/specs/**/*.js' mocha-runner 'test/specs/**/*.js' html text-summary",
2728
"watch": "npm run cover && watch-spawn -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary",
2829
"check": "npm run beautify-check && npm run eslint",
@@ -50,7 +51,7 @@
5051
"npm run verify"
5152
],
5253
"devDependencies": {
53-
"chai-jest-snapshot": "0.3.0",
54+
"chai-jest-snapshot": "2.0.0",
5455
"changelogx": "^1.0.18",
5556
"esbeautifier": "10.1.1",
5657
"eslint": "^2.10.2",

test/specs/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ var proxyquire = require('proxyquire');
99

1010
chai.use(chaiJestSnapshot);
1111

12+
before(function() {
13+
chaiJestSnapshot.resetSnapshotRegistry();
14+
});
15+
1216
beforeEach(function() {
1317
chaiJestSnapshot.configureUsingMochaContext(this);
1418
});

0 commit comments

Comments
 (0)