fix: prevent MSW from loading globally to fix CI test hanging
- Remove msw-setup.ts from global vitest setupFiles - Create separate integration-specific MSW setup - Add vitest.config.integration.ts for integration tests - Update package.json to use integration config for integration tests - Update CI workflow to run unit and integration tests separately - Add aggressive cleanup in integration MSW setup for CI environment This prevents MSW from being initialized for unit tests where it's not needed, which was causing tests to hang in CI after all tests completed.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
|
||||
import { http, HttpResponse } from 'msw';
|
||||
import { mswTestServer, n8nApiMock, testDataBuilders } from './setup/msw-test-server';
|
||||
import { useHandlers } from '../setup/msw-setup';
|
||||
// Import MSW utilities from integration-specific setup
|
||||
import { useHandlers, http, HttpResponse } from './setup/integration-setup';
|
||||
import axios from 'axios';
|
||||
|
||||
describe('MSW Setup Verification', () => {
|
||||
|
||||
Reference in New Issue
Block a user