mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 03:28:49 -07:00
integration tests
This commit is contained in:
parent
0ff391491d
commit
4f68190a25
13 changed files with 1149 additions and 0 deletions
34
webclient/vitest.integration.config.ts
Normal file
34
webclient/vitest.integration.config.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import react from '@vitejs/plugin-react';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
// Integration tests exercise the full inbound/outbound webclient pipeline
|
||||
// (ProtobufService → event handlers → persistence → Redux) with only the
|
||||
// browser WebSocket constructor mocked. They live in `integration/` and run
|
||||
// under their own config so they can use `isolate: true` without slowing down
|
||||
// the unit suite (which relies on `isolate: false` for shared vi.mock state).
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
tsconfigPaths: true,
|
||||
},
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
setupFiles: ['./integration/src/helpers/setup.ts'],
|
||||
include: ['integration/src/**/*.spec.ts'],
|
||||
isolate: false,
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'html'],
|
||||
reportsDirectory: './coverage/integration',
|
||||
include: ['src/**/*.{ts,tsx}'],
|
||||
exclude: [
|
||||
'src/generated/**',
|
||||
'src/**/*.spec.{ts,tsx}',
|
||||
'src/**/__mocks__/**',
|
||||
'src/setupTests.ts',
|
||||
'src/polyfills.ts',
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue