Hello from MCP server
import { setupTestEnvironment, teardownTestEnvironment, setGlobalTestEnvironment } from './testEnvironment.js';
async function globalSetup() {
console.log("🌍 Running Playwright global setup...");
try {
// Setup isolated test environment (backend + frontend)
const environment = await setupTestEnvironment();
// Store environment globally for tests to access
setGlobalTestEnvironment(environment);
// Store URLs in environment variables for Playwright to use
process.env.TEST_BACKEND_URL = environment.backendUrl;
process.env.TEST_FRONTEND_URL = environment.frontendUrl;
console.log("✅ Global setup complete");
return environment;
} catch (error) {
console.error("❌ Global setup failed:", error);
throw error;
}
}
export default globalSetup;