File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -92,21 +92,18 @@ describe('BasePgStore', () => {
9292  } ) ; 
9393
9494  test ( 'postgres transaction connection integrity' ,  async  ( )  =>  { 
95-     const  usageName  =  'postgres:test;datastore-crud' ; 
9695    const  obj  =  db . sql ; 
96+     const  dbName  =  obj . options . database ; 
9797
9898    expect ( sqlTransactionContext . getStore ( ) ) . toBeUndefined ( ) ; 
9999    await  db . sqlTransaction ( async  sql  =>  { 
100-       // Transaction flag is open. 
101-       expect ( sqlTransactionContext . getStore ( ) ?. usageName ) . toBe ( usageName ) ; 
102100      // New connection object. 
103101      const  newObj  =  sql ; 
104102      expect ( obj ) . not . toEqual ( newObj ) ; 
105-       expect ( sqlTransactionContext . getStore ( ) ?. sql ) . toEqual ( newObj ) ; 
103+       expect ( sqlTransactionContext . getStore ( ) ?. [ dbName ] ) . toEqual ( newObj ) ; 
106104
107105      // Nested tx uses the same connection object. 
108106      await  db . sqlTransaction ( sql  =>  { 
109-         expect ( sqlTransactionContext . getStore ( ) ?. usageName ) . toBe ( usageName ) ; 
110107        expect ( newObj ) . toEqual ( sql ) ; 
111108      } ) ; 
112109
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments