@@ -171,56 +171,43 @@ describe('Nyon reporter', function () {
171171 } ) ;
172172
173173 describe ( 'if tick is false' , function ( ) {
174- it ( 'should draw scoreboard, rainbox and face ' , function ( ) {
174+ it ( 'should draw face with expected spaces, _ and ^ ' , function ( ) {
175175 var nyanCat = new NyanCat ( { on : function ( ) { } } ) ;
176176 nyanCat . stats = { passes : 2 , pending : 1 , failures : 0 } ;
177177
178- nyanCat . draw ( ) ;
178+ nyanCat . draw . call ( {
179+ tick : false ,
180+ appendRainbow : function ( ) { } ,
181+ rainbowify : function ( ) { } ,
182+ drawScoreboard : function ( ) { } ,
183+ drawRainbow : function ( ) { } ,
184+ drawNyanCat : NyanCat . prototype . drawNyanCat ,
185+ scoreboardWidth : 0 ,
186+ trajectories : [ [ ] ] ,
187+ face : function ( ) { } ,
188+ cursorUp : function ( ) { }
189+ } ) ;
190+
179191 process . stdout . write = stdoutWrite ;
180192 var expectedArray = [
181- ' ' ,
182- '\u001b[32m2\u001b[0m' ,
183- '\n' ,
184- ' ' ,
185- '\u001b[31m0\u001b[0m' ,
186- '\n' ,
187- ' ' ,
188- '\u001b[36m1\u001b[0m' ,
189- '\n' ,
190- '\n' ,
191- '\u001b[4A' ,
192- '\u001b[5C' ,
193- '\u001b[38;5;154m-\u001b[0m' ,
194- '\n' ,
195- '\u001b[5C' ,
196- '\u001b[38;5;154m-\u001b[0m' ,
197- '\n' ,
198- '\u001b[5C' ,
199- '\u001b[38;5;154m-\u001b[0m' ,
200- '\n' ,
201- '\u001b[5C' ,
202- '\u001b[38;5;154m-\u001b[0m' ,
203- '\n' ,
204- '\u001b[4A' ,
205- '\u001b[6C' ,
193+ '\u001b[0C' ,
206194 '_,------,' ,
207195 '\n' ,
208- '\u001b[6C ' ,
196+ '\u001b[0C ' ,
209197 '_| /\\_/\\ ' ,
210198 '\n' ,
211- '\u001b[6C ' ,
212- '^|__( o .o) ' ,
199+ '\u001b[0C ' ,
200+ '^|__undefined ' ,
213201 '\n' ,
214- '\u001b[6C ' ,
202+ '\u001b[0C ' ,
215203 ' "" "" ' ,
216- '\n' ,
217- '\u001b[4A'
204+ '\n'
218205 ] ;
219206 stdout . should . deepEqual ( expectedArray ) ;
220207 } ) ;
221208 } ) ;
222209 describe ( 'if tick is true' , function ( ) {
223- it ( 'should draw scoreboard, rainbox and face ' , function ( ) {
210+ it ( 'should draw face with expected spaces, _ and ~ ' , function ( ) {
224211 var nyanCat = new NyanCat ( { on : function ( ) { } } ) ;
225212 nyanCat . stats = { passes : 2 , pending : 1 , failures : 0 } ;
226213
@@ -269,7 +256,7 @@ describe('Nyon reporter', function () {
269256 } ;
270257 } ) ;
271258
272- it ( 'should write cursor down interaction with expected number ' , function ( ) {
259+ it ( 'should write cursor down interaction with expected number' , function ( ) {
273260 var nyanCat = new NyanCat ( { on : function ( ) { } } ) ;
274261 var expectedNumber = 25 ;
275262
0 commit comments