File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -122,18 +122,19 @@ describe('AuthData Unique Index', () => {
122122 } ) ;
123123
124124 it ( 'should skip startup index creation when createIndexAuthDataUniqueness is false' , async ( ) => {
125- await reconfigureServer ( {
126- auth : { fakeAuthProvider } ,
127- databaseAdapter : undefined ,
128- databaseOptions : { createIndexAuthDataUniqueness : false } ,
129- } ) ;
130125 const config = Config . get ( 'test' ) ;
131126 const adapter = config . database . adapter ;
132127 const spy = spyOn ( adapter , 'ensureAuthDataUniqueness' ) . and . callThrough ( ) ;
133128
134- // Trigger performInitialization again to verify the option is respected
129+ // Temporarily set the option to false
130+ const originalOptions = config . database . options . databaseOptions ;
131+ config . database . options . databaseOptions = { createIndexAuthDataUniqueness : false } ;
132+
135133 await config . database . performInitialization ( ) ;
136134 expect ( spy ) . not . toHaveBeenCalled ( ) ;
135+
136+ // Restore original options
137+ config . database . options . databaseOptions = originalOptions ;
137138 } ) ;
138139
139140 it ( 'should handle calling ensureAuthDataUniqueness multiple times via cache' , async ( ) => {
You can’t perform that action at this time.
0 commit comments