mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +00:00 
			
		
		
		
	fix: unit tests
This commit is contained in:
		
							parent
							
								
									7b9940acf4
								
							
						
					
					
						commit
						00ec2c98a8
					
				@ -47,6 +47,10 @@ describe('Upload plugin bootstrap function', () => {
 | 
			
		||||
            weeklyMetrics: {
 | 
			
		||||
              registerCron() {},
 | 
			
		||||
            },
 | 
			
		||||
            extensions: {
 | 
			
		||||
              contentManager: { entityManager: { addSignedFileUrlsToAdmin: jest.fn() } },
 | 
			
		||||
              core: { entityService: { addSignedFileUrlsToEntityService: jest.fn() } },
 | 
			
		||||
            },
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
@ -32,13 +32,6 @@ jest.mock('@strapi/provider-upload-local', () => ({
 | 
			
		||||
  },
 | 
			
		||||
}));
 | 
			
		||||
 | 
			
		||||
jest.mock('../utils', () => ({
 | 
			
		||||
  ...jest.requireActual('../utils'),
 | 
			
		||||
  getService: () => ({
 | 
			
		||||
    contentManager: { entityManager: { addSignedFileUrlsToAdmin: jest.fn() } },
 | 
			
		||||
  }),
 | 
			
		||||
}));
 | 
			
		||||
 | 
			
		||||
describe('Upload plugin register function', () => {
 | 
			
		||||
  test('The upload plugin registers the /upload route', async () => {
 | 
			
		||||
    const registerRoute = jest.fn();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user