* WIP: Break the tauri e2e tests apart Will fix #2658 * Clean up * Longer before timeout * Also exclude tauri tests from vitest * Utils fn back in app.spec.ts * Remove utils * Change before back to it * Remove explicit mocha dep * Revert other attemps at fixing the browser issues. mocha dep was the issue * Clean up * Signin/out sep with auth flows * Lint --------- Co-authored-by: Frank Noirot <frank@zoo.dev>
		
			
				
	
	
		
			57 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import react from '@vitejs/plugin-react'
 | 
						|
import viteTsconfigPaths from 'vite-tsconfig-paths'
 | 
						|
import eslint from 'vite-plugin-eslint'
 | 
						|
import { defineConfig, configDefaults } from 'vitest/config'
 | 
						|
import version from 'vite-plugin-package-version'
 | 
						|
 | 
						|
const config = defineConfig({
 | 
						|
  server: {
 | 
						|
    open: true,
 | 
						|
    port: 3000,
 | 
						|
    watch: {
 | 
						|
      ignored: ['**/target/**'],
 | 
						|
    },
 | 
						|
  },
 | 
						|
  test: {
 | 
						|
    globals: true,
 | 
						|
    pool: 'forks',
 | 
						|
    poolOptions: {
 | 
						|
      forks: {
 | 
						|
        maxForks: 2,
 | 
						|
        minForks: 1,
 | 
						|
      },
 | 
						|
    },
 | 
						|
    setupFiles: ['src/setupTests.ts', '@vitest/web-worker'],
 | 
						|
    environment: 'happy-dom',
 | 
						|
    coverage: {
 | 
						|
      provider: 'istanbul', // or 'v8'
 | 
						|
    },
 | 
						|
    exclude: [...configDefaults.exclude, '**/e2e/**/*'],
 | 
						|
    deps: {
 | 
						|
      optimizer: {
 | 
						|
        web: {
 | 
						|
          include: ['vitest-canvas-mock'],
 | 
						|
        },
 | 
						|
      },
 | 
						|
    },
 | 
						|
    clearMocks: true,
 | 
						|
    restoreMocks: true,
 | 
						|
    mockReset: true,
 | 
						|
    reporters: process.env.GITHUB_ACTIONS
 | 
						|
      ? ['dot', 'github-actions']
 | 
						|
      : ['verbose', 'hanging-process'],
 | 
						|
    testTimeout: 1000,
 | 
						|
    hookTimeout: 1000,
 | 
						|
    teardownTimeout: 1000,
 | 
						|
  },
 | 
						|
  build: {
 | 
						|
    outDir: 'build',
 | 
						|
  },
 | 
						|
  plugins: [react(), viteTsconfigPaths(), eslint(), version()],
 | 
						|
  worker: {
 | 
						|
    plugins: () => [viteTsconfigPaths()],
 | 
						|
  },
 | 
						|
})
 | 
						|
 | 
						|
export default config
 |