| 
									
										
										
										
											2021-10-04 11:54:39 +02:00
										 |  |  | 'use strict'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-23 15:18:57 +02:00
										 |  |  | /** | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Strapi | 
					
						
							|  |  |  |  * This file allow to mock any key that is in the global strapi variable | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-01 15:50:11 +02:00
										 |  |  | // FIXME create a better jest setup
 | 
					
						
							| 
									
										
										
										
											2021-10-04 11:54:39 +02:00
										 |  |  | require('@testing-library/jest-dom/extend-expect'); | 
					
						
							| 
									
										
										
										
											2021-01-29 13:36:54 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-06 09:14:31 +02:00
										 |  |  | global.process.env.ADMIN_PATH = '/admin/'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-23 15:18:57 +02:00
										 |  |  | global.strapi = { | 
					
						
							| 
									
										
										
										
											2020-03-24 07:35:16 +01:00
										 |  |  |   backendURL: 'http://localhost:1337', | 
					
						
							| 
									
										
										
										
											2021-07-01 15:50:11 +02:00
										 |  |  |   isEE: false, | 
					
						
							| 
									
										
										
										
											2021-07-05 11:20:21 +02:00
										 |  |  |   features: { | 
					
						
							|  |  |  |     SSO: 'sso', | 
					
						
							|  |  |  |     allFeatures: [], | 
					
						
							|  |  |  |     isEnabled: () => false, | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2021-07-01 15:50:11 +02:00
										 |  |  |   projectType: 'Community', | 
					
						
							| 
									
										
										
										
											2019-04-23 15:18:57 +02:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2021-10-07 09:24:04 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | global.prompt = jest.fn(); | 
					
						
							| 
									
										
										
										
											2021-10-18 14:47:12 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-08 23:33:39 +02:00
										 |  |  | global.URL.createObjectURL = (file) => `http://localhost:4000/assets/${file.name}`; |