mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: remove remaining warnings in tests (#3296)
This commit is contained in:
		
							parent
							
								
									10bf75a2ab
								
							
						
					
					
						commit
						10f7d57f13
					
				| @ -16,6 +16,7 @@ beforeEach(() => { | ||||
| test('should not set user if unknown token', async () => { | ||||
|     const accountService = { | ||||
|         getAccountByPersonalAccessToken: jest.fn(), | ||||
|         addPATSeen: jest.fn(), | ||||
|     }; | ||||
| 
 | ||||
|     const func = patMiddleware(config, { accountService }); | ||||
| @ -65,6 +66,7 @@ test('should add user if known token', async () => { | ||||
|     }); | ||||
|     const accountService = { | ||||
|         getAccountByPersonalAccessToken: jest.fn().mockReturnValue(apiUser), | ||||
|         addPATSeen: jest.fn(), | ||||
|     }; | ||||
| 
 | ||||
|     const func = patMiddleware(config, { accountService }); | ||||
|  | ||||
| @ -34,12 +34,18 @@ jest.mock('./metrics', () => ({ | ||||
| jest.mock('./db', () => ({ | ||||
|     createStores() { | ||||
|         return { | ||||
|             db: { destroy: () => undefined }, | ||||
|             clientInstanceStore: { destroy: noop }, | ||||
|             db: { | ||||
|                 destroy: () => undefined, | ||||
|             }, | ||||
|             clientInstanceStore: { | ||||
|                 destroy: noop, | ||||
|                 removeInstancesOlderThanTwoDays: noop, | ||||
|             }, | ||||
|             clientMetricsStore: { destroy: noop, on: noop }, | ||||
|             eventStore, | ||||
|             publicSignupTokenStore: { destroy: noop, on: noop }, | ||||
|             settingStore, | ||||
|             projectStore: { getAll: () => Promise.resolve([]) }, | ||||
|         }; | ||||
|     }, | ||||
| })); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user