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 1
1
const chai = require ( "chai" ) ,
2
- chaiAsPromised = require ( "chai-as-promised" ) ;
2
+ chaiAsPromised = require ( "chai-as-promised" ) ,
3
+ fs = require ( 'fs' ) ,
4
+ sinon = require ( 'sinon' ) ;
3
5
4
6
const capabilityHelper = require ( "../../../../bin/helpers/capabilityHelper" ) ,
5
7
Constants = require ( "../../../../bin/helpers/constants" ) ,
@@ -253,6 +255,10 @@ describe("capabilityHelper.js", () => {
253
255
254
256
describe ( "validate parallels specified in bsconfig and arguments" , ( ) => {
255
257
beforeEach ( ( ) => {
258
+ //Stub for cypress json validation
259
+ sinon . stub ( fs , 'existsSync' ) . returns ( true ) ;
260
+ sinon . stub ( fs , 'readFileSync' ) . returns ( "{}" ) ;
261
+
256
262
bsConfig = {
257
263
auth : { } ,
258
264
browsers : [
@@ -268,6 +274,11 @@ describe("capabilityHelper.js", () => {
268
274
} ;
269
275
} ) ;
270
276
277
+ afterEach ( ( ) => {
278
+ fs . existsSync . restore ( ) ;
279
+ fs . readFileSync . restore ( ) ;
280
+ } ) ;
281
+
271
282
it ( "validate parallels present in arguments (not a number) when specified (valid) in bsconfig run_settings" , ( ) => {
272
283
bsConfig . run_settings . parallels = 10 ;
273
284
return capabilityHelper
You can’t perform that action at this time.
0 commit comments