@@ -26,8 +26,6 @@ describe('configureMocha', function() {
2626 }
2727 this . sandbox = sandbox . create ( )
2828 this . spyReporter = this . sandbox . spy ( Mocha . prototype , 'reporter' )
29- this . spyUseColors = this . sandbox . spy ( Mocha . prototype , 'useColors' )
30- this . spyUseInlineDiffs = this . sandbox . spy ( Mocha . prototype , 'useInlineDiffs' )
3129 this . spyEnableTimeouts = this . sandbox . spy ( Mocha . prototype , 'enableTimeouts' )
3230 this . spyGrep = this . sandbox . spy ( Mocha . prototype , 'grep' )
3331 this . spyGrowl = this . sandbox . spy ( Mocha . prototype , 'growl' )
@@ -60,27 +58,36 @@ describe('configureMocha', function() {
6058 )
6159 } )
6260
63- it ( 'should call useColors()' , function ( ) {
64- configureMocha ( {
65- ...this . options
61+ it ( 'should set color' , function ( ) {
62+ var mocha = configureMocha ( {
63+ ...this . options ,
64+ colors : undefined
6665 } )
6766
68- assert . isTrue ( this . spyUseColors . called , 'useColors() should be called' )
69- assert . isTrue ( this . spyUseColors . calledWith ( this . options . colors ) )
67+ assert . isFalse ( mocha . options . color )
68+
69+ mocha = configureMocha ( {
70+ ...this . options ,
71+ colors : true
72+ } )
73+
74+ assert . isTrue ( mocha . options . color )
7075 } )
7176
72- it ( 'should call useInlineDiffs()' , function ( ) {
73- configureMocha ( {
74- ...this . options
77+ it ( 'should set inlineDiffs' , function ( ) {
78+ var mocha = configureMocha ( {
79+ ...this . options ,
80+ useInlineDiffs : undefined
7581 } )
7682
77- assert . isTrue (
78- this . spyUseInlineDiffs . called ,
79- 'useInlineDiffs() should be called'
80- )
81- assert . isTrue (
82- this . spyUseInlineDiffs . calledWith ( this . options . useInlineDiffs )
83- )
83+ assert . isFalse ( mocha . options . inlineDiffs )
84+
85+ mocha = configureMocha ( {
86+ ...this . options ,
87+ useInlineDiffs : true
88+ } )
89+
90+ assert . isTrue ( mocha . options . inlineDiffs )
8491 } )
8592
8693 it ( 'should call enableTimeouts()' , function ( ) {
0 commit comments