@@ -29,13 +29,13 @@ describe("syncSpecsLogs", () => {
2929 context ( "getCombinationName" , ( ) => {
3030 const get_path = syncSpecsLogs . __get__ ( "getCombinationName" ) ; ;
3131 let spec = {
32- "os" : "Windows 10 " ,
32+ "os" : "Windows" ,
3333 "osVersion" : "10" ,
3434 "browser" : "chrome" ,
3535 "browserVersion" : "86"
3636 }
3737 it ( "returns combination name" , ( ) => {
38- let expectedCombination = `${ spec [ "os" ] } ${ spec [ "osVersion" ] } / ${ spec [ "browser" ] } ${ spec [ "browserVersion" ] } ` ;
38+ let expectedCombination = `Chrome 86 (Windows 10) ` ;
3939 expect ( get_path ( spec ) ) . to . equal ( expectedCombination ) ;
4040 } ) ;
4141 } ) ;
@@ -61,15 +61,12 @@ describe("syncSpecsLogs", () => {
6161 const printInitialLog = syncSpecsLogs . __get__ ( "printInitialLog" ) ;
6262
6363 it ( "should print inital logs for specs in sync" , ( ) => {
64- var loggerInfoStub = sinon . stub ( logger , 'info' ) ;
6564
6665 printInitialLog ( )
6766
6867 expect ( syncSpecsLogs . __get__ ( "n" ) ) . to . equal ( Constants . syncCLI . INITIAL_DELAY_MULTIPLIER ) ;
6968 expect ( syncSpecsLogs . __get__ ( "startTime" ) ) . to . not . be . null ;
70- sinon . assert . calledWith ( loggerInfoStub , Constants . syncCLI . LOGS . INIT_LOG ) ;
7169
72- loggerInfoStub . restore ( ) ;
7370 } ) ;
7471 } ) ;
7572
@@ -95,10 +92,12 @@ describe("syncSpecsLogs", () => {
9592 syncSpecsLogs . __set__ ( 'getBorderConfig' , getBorderConfigStub ) ;
9693
9794 let options = getTableConfig ( ) ;
98- expect ( options . singleLine ) . to . be . true ;
99- expect ( options . columnDefault . width ) . to . equal ( 50 ) ;
100- expect ( options . columns [ 0 ] . alignment ) . to . equal ( 'right' ) ;
101- expect ( options . columnCount ) . to . equal ( 2 ) ;
95+ expect ( options . columnDefault . width ) . to . equal ( 25 ) ;
96+ expect ( options . columns [ 1 ] . alignment ) . to . equal ( 'center' ) ;
97+ expect ( options . columns [ 2 ] . alignment ) . to . equal ( 'left' ) ;
98+ expect ( options . columns [ 1 ] . width ) . to . equal ( 1 ) ;
99+ expect ( options . columns [ 2 ] . width ) . to . equal ( 30 ) ;
100+ expect ( options . columnCount ) . to . equal ( 3 ) ;
102101 expect ( getBorderConfigStub . calledOnce ) . to . be . true ;
103102 } ) ;
104103 } ) ;
@@ -108,8 +107,8 @@ describe("syncSpecsLogs", () => {
108107
109108 it ( 'should return proper border option for spec table' , ( ) => {
110109 let options = getBorderConfig ( ) ;
111- expect ( options . topBody ) . to . equal ( "- " ) ;
112- expect ( options . bottomBody ) . to . equal ( "- " ) ;
110+ expect ( options . topBody ) . to . equal ( "" ) ;
111+ expect ( options . bottomBody ) . to . equal ( "" ) ;
113112 } ) ;
114113 } ) ;
115114
@@ -122,7 +121,7 @@ describe("syncSpecsLogs", () => {
122121 syncSpecsLogs . __set__ ( 'stream' , stream ) ;
123122 let combination = "Windows 10" , path = "path" , status = "passed" ;
124123 writeToTable ( combination , path , status ) ;
125- sinon . assert . calledOnceWithExactly ( stream . write , [ combination + ":" , `${ path } ${ status } ` ] ) ;
124+ sinon . assert . calledOnceWithExactly ( stream . write , [ combination , ":" , `${ path } ${ status } ` ] ) ;
126125 } ) ;
127126 } ) ;
128127
@@ -200,7 +199,7 @@ describe("syncSpecsLogs", () => {
200199 context ( "printSpecsStatus" , ( ) => {
201200 const printSpecsStatus = syncSpecsLogs . __get__ ( "printSpecsStatus" ) ;
202201 let startTime = Date . now ( ) , endTime = Date . now ( ) + 10 , counter = 0 ;
203- let specSummary = { specs : [ ] } , getOptions , getTableConfig , tableStream , whileProcess , loggerInfoStub ;
202+ let specSummary = { specs : [ ] } , getOptions , getTableConfig , tableStream , whileProcess ;
204203
205204 beforeEach ( ( ) => {
206205 counter = 0 ;
@@ -214,8 +213,6 @@ describe("syncSpecsLogs", () => {
214213 tableStream = sandbox . stub ( ) ;
215214 syncSpecsLogs . __set__ ( 'tableStream' , tableStream ) ;
216215
217- loggerInfoStub = sandbox . stub ( logger , 'info' ) ;
218-
219216 whileProcess = sandbox . stub ( ) . callsFake ( function ( whilstCallback ) {
220217 counter ++
221218 if ( counter >= 3 ) {
@@ -237,7 +234,6 @@ describe("syncSpecsLogs", () => {
237234 expect ( getOptions . calledOnce ) . to . be . true ;
238235 expect ( getTableConfig . calledOnce ) . to . be . true ;
239236 expect ( tableStream . calledOnce ) . to . be . true ;
240- expect ( loggerInfoStub . calledOnce ) . to . be . true ;
241237 expect ( whileProcess . calledOnce ) . to . be . false ;
242238 expect ( specSummary . specs ) . deep . to . equal ( [ ] )
243239 expect ( specSummary . duration ) . to . eql ( endTime - startTime ) ;
0 commit comments