@@ -541,23 +541,28 @@ describe('utils', () => {
541541 } ) ;
542542
543543 describe ( 'isCypressProjDirValid' , ( ) => {
544- it ( 'should return true when cypressDir and cypressProjDir is same' , ( ) => {
545- expect ( utils . isCypressProjDirValid ( '/absolute/path' , '/absolute/path' ) ) . to
546- . be . true ;
544+ it ( 'should return true when cypressProjDir and integrationFoldDir is same' , ( ) => {
545+ expect ( utils . isCypressProjDirValid ( '/absolute/path' , '/absolute/path' ) ) . to . be . true ;
546+
547+ // should be as below for windows but path.resolve thinks windows path as a filename when run on linux/mac
548+ // expect(utils.isCypressProjDirValid('C:\\absolute\\path', 'C:\\absolute\\path')).to.be.true;
549+ expect ( utils . isCypressProjDirValid ( '/C/absolute/path' , '/C/absolute/path' ) ) . to . be . true ;
547550 } ) ;
548551
549- it ( 'should return true when cypressProjDir is child directory of cypressDir' , ( ) => {
550- expect (
551- utils . isCypressProjDirValid (
552- '/absolute/path' ,
553- '/absolute/path/childpath'
554- )
555- ) . to . be . true ;
552+ it ( 'should return true when integrationFoldDir is child directory of cypressProjDir' , ( ) => {
553+ expect ( utils . isCypressProjDirValid ( '/absolute/path' , '/absolute/path/childpath' ) ) . to . be . true ;
554+
555+ // should be as below for windows but path.resolve thinks windows path as a filename when run on linux/mac
556+ // expect(utils.isCypressProjDirValid('C:\\absolute\\path', 'C:\\absolute\\path\\childpath')).to.be.true;
557+ expect ( utils . isCypressProjDirValid ( '/C/absolute/path' , '/C/absolute/path/childpath' ) ) . to . be . true ;
556558 } ) ;
557559
558- it ( 'should return false when cypressProjDir is not child directory of cypressDir' , ( ) => {
559- expect ( utils . isCypressProjDirValid ( '/absolute/path' , '/absolute' ) ) . to . be
560- . false ;
560+ it ( 'should return false when integrationFoldDir is not child directory of cypressProjDir' , ( ) => {
561+ expect ( utils . isCypressProjDirValid ( '/absolute/path' , '/absolute' ) ) . to . be . false ;
562+
563+ // should be as below for windows but path.resolve thinks windows path as a filename when run on linux/mac
564+ // expect(utils.isCypressProjDirValid('C:\\absolute\\path', 'C:\\absolute')).to.be.false;
565+ expect ( utils . isCypressProjDirValid ( '/C/absolute/path' , '/C/absolute' ) ) . to . be . false ;
561566 } ) ;
562567 } ) ;
563568
0 commit comments