Skip to content

Commit

Permalink
Remove noise output from JSON reporter test (#3881)
Browse files Browse the repository at this point in the history
  • Loading branch information
plroebuck committed Apr 18, 2019
1 parent 31c019e commit 07ea876
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/reporters/json.spec.js
@@ -1,5 +1,6 @@
'use strict';

var sinon = require('sinon');
var Mocha = require('../../');
var Suite = Mocha.Suite;
var Runner = Mocha.Runner;
Expand Down Expand Up @@ -28,7 +29,9 @@ describe('JSON reporter', function() {
})
);

var stdoutWrite = sinon.stub(process.stdout, 'write');
runner.run(function(failureCount) {
stdoutWrite.restore();
expect(runner, 'to satisfy', {
testResults: {
failures: [
Expand All @@ -49,7 +52,9 @@ describe('JSON reporter', function() {
it('should have 1 test pending', function(done) {
suite.addTest(new Test(testTitle));

var stdoutWrite = sinon.stub(process.stdout, 'write');
runner.run(function(failureCount) {
stdoutWrite.restore();
expect(runner, 'to satisfy', {
testResults: {
pending: [
Expand Down Expand Up @@ -78,7 +83,9 @@ describe('JSON reporter', function() {
})
);

var stdoutWrite = sinon.stub(process.stdout, 'write');
runner.run(function(failureCount) {
stdoutWrite.restore();
expect(runner, 'to satisfy', {
testResults: {
failures: [
Expand Down

0 comments on commit 07ea876

Please sign in to comment.