add git diffs and permission support
This commit is contained in:
@@ -1,6 +1,22 @@
|
||||
import { stopServers } from './server-utils.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 globalTeardown() {
|
||||
// Clean up test files
|
||||
cleanupTestFiles();
|
||||
|
||||
// Skip if servers are managed externally (e.g., by scripts/test)
|
||||
if (process.env.SKIP_SERVER_SETUP) {
|
||||
console.log('\n=== Skipping server teardown (SKIP_SERVER_SETUP is set) ===\n');
|
||||
|
||||
Reference in New Issue
Block a user