File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -333,14 +333,10 @@ exports.setCypressNpmDependency = (bsConfig) => {
333333 if ( runSettings . npm_dependencies !== undefined &&
334334 Object . keys ( runSettings . npm_dependencies ) . length !== 0 &&
335335 typeof runSettings . npm_dependencies === 'object' ) {
336- if ( ! ( "cypress" in runSettings . npm_dependencies ) ) {
336+ if ( ! ( "cypress" in runSettings . npm_dependencies ) && Constants . CYPRESS_V10_AND_ABOVE_TYPE ) {
337337 logger . warn ( "Missing cypress not found in npm_dependencies" ) ;
338338 if ( "cypress_version" in runSettings ) {
339- if ( runSettings . cypress_version . toString ( ) . match ( Constants . LATEST_VERSION_SYNTAX_REGEX ) ) {
340- runSettings . npm_dependencies . cypress = `^${ runSettings . cypress_version . toString ( ) . split ( "." ) [ 0 ] } `
341- } else {
342- runSettings . npm_dependencies . cypress = runSettings . cypress_version ;
343- }
339+ runSettings . npm_dependencies . cypress = `^${ runSettings . cypress_version . toString ( ) . split ( "." ) [ 0 ] } ` ;
344340 } else if ( runSettings . cypressTestSuiteType === Constants . CYPRESS_V10_AND_ABOVE_TYPE ) {
345341 runSettings . npm_dependencies . cypress = "latest" ;
346342 }
Original file line number Diff line number Diff line change @@ -3582,7 +3582,7 @@ describe('utils', () => {
35823582 } ,
35833583 } ;
35843584 utils . setCypressNpmDependency ( bsConfig ) ;
3585- chai . assert . equal ( bsConfig . run_settings . npm_dependencies . cypress , "10.0.0 " ) ;
3585+ chai . assert . equal ( bsConfig . run_settings . npm_dependencies . cypress , "^10 " ) ;
35863586 } ) ;
35873587
35883588 it ( 'should not set cypress for < 9 cypress version if cypress_version missing' , ( ) => {
You can’t perform that action at this time.
0 commit comments