File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
3+ var sinon = require ( 'sinon' ) ;
34var Mocha = require ( '../../' ) ;
45var Suite = Mocha . Suite ;
56var Runner = Mocha . Runner ;
@@ -28,7 +29,9 @@ describe('JSON reporter', function() {
2829 } )
2930 ) ;
3031
32+ var stdoutWrite = sinon . stub ( process . stdout , 'write' ) ;
3133 runner . run ( function ( failureCount ) {
34+ stdoutWrite . restore ( ) ;
3235 expect ( runner , 'to satisfy' , {
3336 testResults : {
3437 failures : [
@@ -49,7 +52,9 @@ describe('JSON reporter', function() {
4952 it ( 'should have 1 test pending' , function ( done ) {
5053 suite . addTest ( new Test ( testTitle ) ) ;
5154
55+ var stdoutWrite = sinon . stub ( process . stdout , 'write' ) ;
5256 runner . run ( function ( failureCount ) {
57+ stdoutWrite . restore ( ) ;
5358 expect ( runner , 'to satisfy' , {
5459 testResults : {
5560 pending : [
@@ -78,7 +83,9 @@ describe('JSON reporter', function() {
7883 } )
7984 ) ;
8085
86+ var stdoutWrite = sinon . stub ( process . stdout , 'write' ) ;
8187 runner . run ( function ( failureCount ) {
88+ stdoutWrite . restore ( ) ;
8289 expect ( runner , 'to satisfy' , {
8390 testResults : {
8491 failures : [
You can’t perform that action at this time.
0 commit comments