@@ -25,27 +25,25 @@ it('sets properties correctly on create', async () => {
2525 expect ( repository ) . toMatchSnapshot ( ) ;
2626} ) ;
2727
28- if ( typeof process . env . CI === 'undefined' ) {
29- it ( 'gets the current branch names' , async ( ) => {
30- const repository = new Repository ( 'permafrost-dev/codeboost' , tempPath ) ;
31- repository . path = `${ __dirname } /../..` ;
28+ it ( 'gets a list of local branches' , async ( ) => {
29+ const repository = new Repository ( 'permafrost-dev/codeboost' , tempPath ) ;
30+ repository . path = `${ __dirname } /../..` ;
3231
33- const mainBranchName = 'main' ;
34- const branch = await repository . currentBranch ( ) ;
32+ const branches = await repository . localBranches ( ) ;
3533
36- expect ( branch ) . toBe ( mainBranchName ) ;
37- } ) ;
34+ expect ( branches . all . length ) . toBeGreaterThan ( 0 ) ;
35+ } ) ;
3836
39- it ( 'gets a list of local branches ' , async ( ) => {
40- const repository = new Repository ( 'permafrost-dev/codeboost' , tempPath ) ;
41- repository . path = `${ __dirname } /../..` ;
37+ it ( 'gets the current branch names ' , async ( ) => {
38+ const repository = new Repository ( 'permafrost-dev/codeboost' , tempPath ) ;
39+ repository . path = `${ __dirname } /../..` ;
4240
43- const mainBranchName = 'main' ;
44- const branches = await repository . localBranches ( ) ;
41+ const branch = await repository . currentBranch ( ) ;
4542
46- expect ( branches . all ) . toContain ( mainBranchName ) ;
47- } ) ;
43+ expect ( branch . match ( / m a i n | p u l l . + / ) ) . toBeTruthy ( ) ;
44+ } ) ;
4845
46+ if ( typeof process . env . CI === 'undefined' ) {
4947 it ( 'checks if it is on a branch' , async ( ) => {
5048 const repository = new Repository ( 'permafrost-dev/codeboost' , tempPath ) ;
5149 repository . path = `${ __dirname } /../..` ;
0 commit comments