File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 11const chai = require ( "chai" ) ,
2- chaiAsPromised = require ( "chai-as-promised" ) ;
2+ chaiAsPromised = require ( "chai-as-promised" ) ,
3+ fs = require ( 'fs' ) ,
4+ sinon = require ( 'sinon' ) ;
35
46const capabilityHelper = require ( "../../../../bin/helpers/capabilityHelper" ) ,
57 Constants = require ( "../../../../bin/helpers/constants" ) ,
@@ -253,6 +255,10 @@ describe("capabilityHelper.js", () => {
253255
254256 describe ( "validate parallels specified in bsconfig and arguments" , ( ) => {
255257 beforeEach ( ( ) => {
258+ //Stub for cypress json validation
259+ sinon . stub ( fs , 'existsSync' ) . returns ( true ) ;
260+ sinon . stub ( fs , 'readFileSync' ) . returns ( "{}" ) ;
261+
256262 bsConfig = {
257263 auth : { } ,
258264 browsers : [
@@ -268,6 +274,11 @@ describe("capabilityHelper.js", () => {
268274 } ;
269275 } ) ;
270276
277+ afterEach ( ( ) => {
278+ fs . existsSync . restore ( ) ;
279+ fs . readFileSync . restore ( ) ;
280+ } ) ;
281+
271282 it ( "validate parallels present in arguments (not a number) when specified (valid) in bsconfig run_settings" , ( ) => {
272283 bsConfig . run_settings . parallels = 10 ;
273284 return capabilityHelper
You can’t perform that action at this time.
0 commit comments