test(FN-000): resolve dashboard test noise
This commit is contained in:
@@ -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 });
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user