mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-27 00:23:41 +09:00 
			
		
		
		
	I'm using this convention in other projects and I think it makes sense for gitea too because the vitest setup file is loaded globally for all tests, not just ones in web_src, so it makes sense to be in the root.
		
			
				
	
	
		
			22 lines
		
	
	
		
			481 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			481 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import {defineConfig} from 'vitest/config';
 | |
| import vuePlugin from '@vitejs/plugin-vue';
 | |
| import {stringPlugin} from 'vite-string-plugin';
 | |
| 
 | |
| export default defineConfig({
 | |
|   test: {
 | |
|     include: ['web_src/**/*.test.js'],
 | |
|     setupFiles: ['web_src/js/vitest.setup.js'],
 | |
|     environment: 'jsdom',
 | |
|     testTimeout: 20000,
 | |
|     open: false,
 | |
|     allowOnly: true,
 | |
|     passWithNoTests: true,
 | |
|     globals: true,
 | |
|     watch: false,
 | |
|   },
 | |
|   plugins: [
 | |
|     stringPlugin(),
 | |
|     vuePlugin(),
 | |
|   ],
 | |
| });
 |