@@ -29,13 +29,13 @@ describe("syncSpecsLogs", () => {
29
29
context ( "getCombinationName" , ( ) => {
30
30
const get_path = syncSpecsLogs . __get__ ( "getCombinationName" ) ; ;
31
31
let spec = {
32
- "os" : "Windows 10 " ,
32
+ "os" : "Windows" ,
33
33
"osVersion" : "10" ,
34
34
"browser" : "chrome" ,
35
35
"browserVersion" : "86"
36
36
}
37
37
it ( "returns combination name" , ( ) => {
38
- let expectedCombination = `${ spec [ "os" ] } ${ spec [ "osVersion" ] } / ${ spec [ "browser" ] } ${ spec [ "browserVersion" ] } ` ;
38
+ let expectedCombination = `Chrome 86 (Windows 10) ` ;
39
39
expect ( get_path ( spec ) ) . to . equal ( expectedCombination ) ;
40
40
} ) ;
41
41
} ) ;
@@ -61,15 +61,12 @@ describe("syncSpecsLogs", () => {
61
61
const printInitialLog = syncSpecsLogs . __get__ ( "printInitialLog" ) ;
62
62
63
63
it ( "should print inital logs for specs in sync" , ( ) => {
64
- var loggerInfoStub = sinon . stub ( logger , 'info' ) ;
65
64
66
65
printInitialLog ( )
67
66
68
67
expect ( syncSpecsLogs . __get__ ( "n" ) ) . to . equal ( Constants . syncCLI . INITIAL_DELAY_MULTIPLIER ) ;
69
68
expect ( syncSpecsLogs . __get__ ( "startTime" ) ) . to . not . be . null ;
70
- sinon . assert . calledWith ( loggerInfoStub , Constants . syncCLI . LOGS . INIT_LOG ) ;
71
69
72
- loggerInfoStub . restore ( ) ;
73
70
} ) ;
74
71
} ) ;
75
72
@@ -95,10 +92,12 @@ describe("syncSpecsLogs", () => {
95
92
syncSpecsLogs . __set__ ( 'getBorderConfig' , getBorderConfigStub ) ;
96
93
97
94
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 ) ;
102
101
expect ( getBorderConfigStub . calledOnce ) . to . be . true ;
103
102
} ) ;
104
103
} ) ;
@@ -108,8 +107,8 @@ describe("syncSpecsLogs", () => {
108
107
109
108
it ( 'should return proper border option for spec table' , ( ) => {
110
109
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 ( "" ) ;
113
112
} ) ;
114
113
} ) ;
115
114
@@ -122,7 +121,7 @@ describe("syncSpecsLogs", () => {
122
121
syncSpecsLogs . __set__ ( 'stream' , stream ) ;
123
122
let combination = "Windows 10" , path = "path" , status = "passed" ;
124
123
writeToTable ( combination , path , status ) ;
125
- sinon . assert . calledOnceWithExactly ( stream . write , [ combination + ":" , `${ path } ${ status } ` ] ) ;
124
+ sinon . assert . calledOnceWithExactly ( stream . write , [ combination , ":" , `${ path } ${ status } ` ] ) ;
126
125
} ) ;
127
126
} ) ;
128
127
@@ -200,7 +199,7 @@ describe("syncSpecsLogs", () => {
200
199
context ( "printSpecsStatus" , ( ) => {
201
200
const printSpecsStatus = syncSpecsLogs . __get__ ( "printSpecsStatus" ) ;
202
201
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 ;
204
203
205
204
beforeEach ( ( ) => {
206
205
counter = 0 ;
@@ -214,8 +213,6 @@ describe("syncSpecsLogs", () => {
214
213
tableStream = sandbox . stub ( ) ;
215
214
syncSpecsLogs . __set__ ( 'tableStream' , tableStream ) ;
216
215
217
- loggerInfoStub = sandbox . stub ( logger , 'info' ) ;
218
-
219
216
whileProcess = sandbox . stub ( ) . callsFake ( function ( whilstCallback ) {
220
217
counter ++
221
218
if ( counter >= 3 ) {
@@ -237,7 +234,6 @@ describe("syncSpecsLogs", () => {
237
234
expect ( getOptions . calledOnce ) . to . be . true ;
238
235
expect ( getTableConfig . calledOnce ) . to . be . true ;
239
236
expect ( tableStream . calledOnce ) . to . be . true ;
240
- expect ( loggerInfoStub . calledOnce ) . to . be . true ;
241
237
expect ( whileProcess . calledOnce ) . to . be . false ;
242
238
expect ( specSummary . specs ) . deep . to . equal ( [ ] )
243
239
expect ( specSummary . duration ) . to . eql ( endTime - startTime ) ;
0 commit comments