add git diffs and permission support

This commit is contained in:
2026-01-19 23:45:03 -05:00
parent 313ac44337
commit 61a2e9b8af
44 changed files with 2051 additions and 267 deletions
+19 -1
View File
@@ -1,12 +1,30 @@
import { startServers } from './server-utils.js';
import { E2E_BACKEND_PORT, E2E_FRONTEND_PORT } from './playwright.config.js';
import { unlinkSync } from 'fs';
import { homedir } from 'os';
import { join } from 'path';
function cleanupTestFiles() {
const testFile = join(homedir(), 'foo.md');
try {
unlinkSync(testFile);
console.log('Cleaned up test file:', testFile);
} catch {
// File doesn't exist, ignore
}
}
export default async function globalSetup() {
// Clean up test files from previous runs
cleanupTestFiles();
// Skip if servers are managed externally (e.g., by scripts/test)
if (process.env.SKIP_SERVER_SETUP) {
console.log('\n=== Skipping server setup (SKIP_SERVER_SETUP is set) ===\n');
return;
}
console.log('\n=== Starting E2E Test Environment ===\n');
await startServers(3000, 5173);
console.log(`Backend port: ${E2E_BACKEND_PORT}, Frontend port: ${E2E_FRONTEND_PORT}`);
await startServers(E2E_BACKEND_PORT, E2E_FRONTEND_PORT);
console.log('\n=== E2E Test Environment Ready ===\n');
}