test(FN-000): resolve dashboard test noise

This commit is contained in:
Aron Prins
2026-05-05 22:25:29 +02:00
parent 46072542cf
commit a9f2fb65ef
15 changed files with 113 additions and 298 deletions

View File

@@ -42,7 +42,7 @@ describe("Session files endpoint", () => {
mkdirSync(testWorktree, { recursive: true });
// Initialize git repo
execSync("git init", { cwd: testWorktree });
execSync("git init --initial-branch=main", { cwd: testWorktree });
execSync("git config user.email test@test.com", { cwd: testWorktree });
execSync("git config user.name Test", { cwd: testWorktree });

View File

@@ -716,7 +716,7 @@ describe("POST /api/projects route handler", () => {
const cloneDestination = join(tempRoot, "cloned-project");
try {
execFileSync("git", ["init", "--bare", bareRepo]);
execFileSync("git", ["init", "--bare", "--initial-branch=main", bareRepo]);
const res = await request(
app,

View File

@@ -307,8 +307,8 @@ function getSharedGitTestRepo(): GitTestRepo {
const repoDir = join(root, "repo");
mkdirSync(repoDir, { recursive: true });
execFileSync("git", ["init", "--bare", remoteDir], { stdio: "pipe" });
execFileSync("git", ["init", repoDir], { stdio: "pipe" });
execFileSync("git", ["init", "--bare", "--initial-branch=main", remoteDir], { stdio: "pipe" });
execFileSync("git", ["init", "--initial-branch=main", repoDir], { stdio: "pipe" });
execFileSync("git", ["-C", repoDir, "config", "user.email", "kb-tests@example.com"], { stdio: "pipe" });
execFileSync("git", ["-C", repoDir, "config", "user.name", "KB Tests"], { stdio: "pipe" });
writeFileSync(join(repoDir, "README.md"), "# Test Repo\n");
@@ -1485,4 +1485,3 @@ describe("Workspace File Routes", () => {
});
});
});

View File

@@ -307,8 +307,8 @@ function getSharedGitTestRepo(): GitTestRepo {
const repoDir = join(root, "repo");
mkdirSync(repoDir, { recursive: true });
execFileSync("git", ["init", "--bare", remoteDir], { stdio: "pipe" });
execFileSync("git", ["init", repoDir], { stdio: "pipe" });
execFileSync("git", ["init", "--bare", "--initial-branch=main", remoteDir], { stdio: "pipe" });
execFileSync("git", ["init", "--initial-branch=main", repoDir], { stdio: "pipe" });
execFileSync("git", ["-C", repoDir, "config", "user.email", "kb-tests@example.com"], { stdio: "pipe" });
execFileSync("git", ["-C", repoDir, "config", "user.name", "KB Tests"], { stdio: "pipe" });
writeFileSync(join(repoDir, "README.md"), "# Test Repo\n");
@@ -2029,4 +2029,3 @@ describe("GET /tasks/:id/file-diffs", () => {
// --- Git Management route tests ---
// These are integration tests that run against the actual git repository

View File

@@ -694,8 +694,8 @@ function getSharedGitTestRepo(): GitTestRepo {
const repoDir = join(root, "repo");
mkdirSync(repoDir, { recursive: true });
execFileSync("git", ["init", "--bare", remoteDir], { stdio: "pipe" });
execFileSync("git", ["init", repoDir], { stdio: "pipe" });
execFileSync("git", ["init", "--bare", "--initial-branch=main", remoteDir], { stdio: "pipe" });
execFileSync("git", ["init", "--initial-branch=main", repoDir], { stdio: "pipe" });
execFileSync("git", ["-C", repoDir, "config", "user.email", "kb-tests@example.com"], { stdio: "pipe" });
execFileSync("git", ["-C", repoDir, "config", "user.name", "KB Tests"], { stdio: "pipe" });
writeFileSync(join(repoDir, "README.md"), "# Test Repo\n");
@@ -720,4 +720,3 @@ afterAll(() => {
afterEach(() => {
resetDiagnosticsSink();
});