@@ -31,6 +31,7 @@ describe('reporter', function () {
3131 it ( 'should omit adapters not using the right color' , function ( ) {
3232 var anotherAdapter = sinon . spy ( )
3333 anotherAdapter . colors = true
34+ reporter . EXCLUSIVELY_USE_COLORS = false
3435 reporter . adapters . push ( anotherAdapter )
3536 reporter . write ( 'some' )
3637 expect ( adapter ) . to . have . been . calledWith ( 'some' )
@@ -41,6 +42,7 @@ describe('reporter', function () {
4142 var reporter = new m . BaseReporter ( null , null , true , adapter )
4243 var anotherAdapter = sinon . spy ( )
4344 reporter . adapters . push ( anotherAdapter )
45+ reporter . EXCLUSIVELY_USE_COLORS = false
4446 reporter . write ( 'some' )
4547 expect ( adapter ) . to . not . have . been . called
4648 return expect ( anotherAdapter ) . to . not . have . been . called
@@ -50,12 +52,22 @@ describe('reporter', function () {
5052 var reporter = new m . BaseReporter ( null , null , true , adapter )
5153 var anotherAdapter = sinon . spy ( )
5254 reporter . adapters . push ( anotherAdapter )
55+ reporter . EXCLUSIVELY_USE_COLORS = false
5356 adapter . colors = false
5457 reporter . write ( 'some' )
5558 expect ( adapter ) . to . have . been . calledWith ( 'some' )
5659 return expect ( anotherAdapter ) . to . not . have . been . called
5760 } )
5861
62+ it ( 'should call all adapters if EXCLUSIVELY_USE_COLORS is undefined' , function ( ) {
63+ var anotherAdapter = sinon . spy ( )
64+ anotherAdapter . colors = true
65+ reporter . adapters . push ( anotherAdapter )
66+ reporter . write ( 'some' )
67+ expect ( adapter ) . to . have . been . calledWith ( 'some' )
68+ expect ( anotherAdapter ) . to . have . been . calledWith ( 'some' )
69+ } )
70+
5971 it ( 'should format' , function ( ) {
6072 reporter . write ( 'Success: %d Failure: %d' , 10 , 20 )
6173
0 commit comments