| 
									
										
										
										
											2025-01-03 15:20:25 +08:00
										 |  |  | import { defineConfig } from 'vitest/config' | 
					
						
							| 
									
										
										
										
											2023-02-03 18:12:56 +08:00
										 |  |  | import { entries } from './scripts/aliases.js' | 
					
						
							| 
									
										
										
										
											2023-01-26 15:25:55 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | export default defineConfig({ | 
					
						
							|  |  |  |   define: { | 
					
						
							|  |  |  |     __DEV__: true, | 
					
						
							|  |  |  |     __TEST__: true, | 
					
						
							|  |  |  |     __VERSION__: '"test"', | 
					
						
							|  |  |  |     __BROWSER__: false, | 
					
						
							|  |  |  |     __GLOBAL__: false, | 
					
						
							|  |  |  |     __ESM_BUNDLER__: true, | 
					
						
							|  |  |  |     __ESM_BROWSER__: false, | 
					
						
							| 
									
										
										
										
											2024-01-11 18:24:21 +08:00
										 |  |  |     __CJS__: true, | 
					
						
							| 
									
										
										
										
											2023-01-26 15:25:55 +08:00
										 |  |  |     __SSR__: true, | 
					
						
							|  |  |  |     __FEATURE_OPTIONS_API__: true, | 
					
						
							|  |  |  |     __FEATURE_SUSPENSE__: true, | 
					
						
							|  |  |  |     __FEATURE_PROD_DEVTOOLS__: false, | 
					
						
							| 
									
										
										
										
											2023-12-08 16:41:15 +08:00
										 |  |  |     __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__: false, | 
					
						
							| 
									
										
										
										
											2023-01-26 15:25:55 +08:00
										 |  |  |     __COMPAT__: true, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   resolve: { | 
					
						
							| 
									
										
										
										
											2023-02-03 05:00:06 +08:00
										 |  |  |     alias: entries, | 
					
						
							| 
									
										
										
										
											2023-01-26 15:25:55 +08:00
										 |  |  |   }, | 
					
						
							|  |  |  |   test: { | 
					
						
							|  |  |  |     globals: true, | 
					
						
							| 
									
										
										
										
											2024-08-09 23:11:31 +08:00
										 |  |  |     pool: 'threads', | 
					
						
							| 
									
										
										
										
											2023-12-26 14:59:34 +08:00
										 |  |  |     setupFiles: 'scripts/setup-vitest.ts', | 
					
						
							| 
									
										
										
										
											2023-01-26 22:22:43 +08:00
										 |  |  |     environmentMatchGlobs: [ | 
					
						
							|  |  |  |       ['packages/{vue,vue-compat,runtime-dom}/**', 'jsdom'], | 
					
						
							| 
									
										
										
										
											2023-01-26 22:53:39 +08:00
										 |  |  |     ], | 
					
						
							| 
									
										
										
										
											2023-01-27 14:52:41 +08:00
										 |  |  |     sequence: { | 
					
						
							|  |  |  |       hooks: 'list', | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2023-01-26 22:53:39 +08:00
										 |  |  |     coverage: { | 
					
						
							| 
									
										
										
										
											2024-08-29 10:38:07 +08:00
										 |  |  |       provider: 'v8', | 
					
						
							| 
									
										
										
										
											2023-01-26 22:53:39 +08:00
										 |  |  |       reporter: ['text', 'html'], | 
					
						
							| 
									
										
										
										
											2024-08-28 18:06:46 +08:00
										 |  |  |       include: ['packages/*/src/**'], | 
					
						
							| 
									
										
										
										
											2024-08-29 10:38:07 +08:00
										 |  |  |       exclude: [ | 
					
						
							|  |  |  |         // entries that are not really used during tests
 | 
					
						
							|  |  |  |         'packages/vue-compat/**', | 
					
						
							|  |  |  |         'packages/vue/src/dev.ts', | 
					
						
							|  |  |  |         'packages/vue/src/runtime.ts', | 
					
						
							|  |  |  |         // not testable during unit tests
 | 
					
						
							|  |  |  |         'packages/runtime-core/src/profiling.ts', | 
					
						
							|  |  |  |         'packages/runtime-core/src/featureFlags.ts', | 
					
						
							|  |  |  |         'packages/runtime-core/src/customFormatter.ts', | 
					
						
							|  |  |  |         // tested via e2e so no coverage is collected
 | 
					
						
							|  |  |  |         'packages/runtime-core/src/hydrationStrategies.ts', | 
					
						
							|  |  |  |         'packages/runtime-dom/src/components/Transition*', | 
					
						
							|  |  |  |       ], | 
					
						
							| 
									
										
										
										
											2023-01-26 22:53:39 +08:00
										 |  |  |     }, | 
					
						
							| 
									
										
										
										
											2023-01-26 15:25:55 +08:00
										 |  |  |   }, | 
					
						
							| 
									
										
										
										
											2023-12-08 21:26:48 +08:00
										 |  |  | }) |