@@ -3,10 +3,23 @@ const chai = require("chai"),
33 expect = chai . expect ,
44 chaiAsPromised = require ( "chai-as-promised" ) ;
55
6+ const sinon = require ( "sinon" ) ;
67chai . use ( chaiAsPromised ) ;
78const specDetails = require ( '../../../../../bin/helpers/sync/failedSpecsDetails' ) ;
9+ var logger = require ( "../../../../../bin/helpers/logger" ) . syncCliLogger ;
810
911describe ( "failedSpecsDetails" , ( ) => {
12+ var sandbox ;
13+
14+ beforeEach ( ( ) => {
15+ sandbox = sinon . createSandbox ( ) ;
16+ sandbox . stub ( logger , 'info' ) ;
17+ } ) ;
18+
19+ afterEach ( ( ) => {
20+ sandbox . restore ( ) ;
21+ } ) ;
22+
1023 context ( "data is empty" , ( ) => {
1124 let data = [ ] ;
1225 it ( 'returns 0 exit code' , ( ) => {
@@ -30,7 +43,8 @@ describe("failedSpecsDetails", () => {
3043
3144 context ( "data has failed specs" , ( ) => {
3245 let data = [
33- { specName : 'spec2.name.js' , status : 'Failed' , combination : 'Win 10 / Chrome 78' , sessionId : '3d3rdf3r...' }
46+ { specName : 'spec2.name.js' , status : 'Failed' , combination : 'Win 10 / Chrome 78' , sessionId : '3d3rdf3r...' } ,
47+ { specName : 'spec2.name.js' , status : 'Passed' , combination : 'Win 10 / Chrome 78' , sessionId : '3d3rdf3r...' }
3448 ] ;
3549
3650 it ( "returns 1 exit code" , ( ) => {
0 commit comments