File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
packages/mcp-server-supabase/src Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -454,6 +454,36 @@ describe('tools', () => {
454
454
} ) ;
455
455
} ) ;
456
456
457
+ test ( 'enabling branching twice returns the same main branch' , async ( ) => {
458
+ const { callTool } = await setup ( ) ;
459
+ const project = mockProjects . values ( ) . next ( ) . value ! ;
460
+
461
+ const firstResult = await callTool ( {
462
+ name : 'enable_branching' ,
463
+ arguments : {
464
+ project_id : project . id ,
465
+ } ,
466
+ } ) ;
467
+
468
+ const secondResult = await callTool ( {
469
+ name : 'enable_branching' ,
470
+ arguments : {
471
+ project_id : project . id ,
472
+ } ,
473
+ } ) ;
474
+
475
+ const listResult = await callTool ( {
476
+ name : 'list_branches' ,
477
+ arguments : {
478
+ project_id : project . id ,
479
+ } ,
480
+ } ) ;
481
+
482
+ expect ( listResult . length ) . toBe ( 1 ) ;
483
+ expect ( listResult [ 0 ] ) . toEqual ( firstResult ) ;
484
+ expect ( firstResult ) . toEqual ( secondResult ) ;
485
+ } ) ;
486
+
457
487
test ( 'create branch' , async ( ) => {
458
488
const { callTool } = await setup ( ) ;
459
489
const project = mockProjects . values ( ) . next ( ) . value ! ;
You can’t perform that action at this time.
0 commit comments