mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
fix(server): Address PR #733 review feedback and fix cross-platform tests
- Extract merge logic from pipeline-orchestrator to merge-service.ts to avoid HTTP self-call - Make agent-executor error handling provider-agnostic using shared isAuthenticationError utility - Fix cross-platform path handling in tests using path.normalize/path.resolve helpers - Add catch handlers in plan-approval-service tests to prevent unhandled promise rejection warnings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
||||
import path from 'path';
|
||||
import type { Feature } from '@automaker/types';
|
||||
|
||||
/**
|
||||
* Helper to normalize paths for cross-platform test compatibility.
|
||||
*/
|
||||
const normalizePath = (p: string): string => path.resolve(p);
|
||||
import {
|
||||
ExecutionService,
|
||||
type RunAgentFn,
|
||||
@@ -931,8 +937,8 @@ describe('execution-service.ts', () => {
|
||||
// Should still run agent, just with project path
|
||||
expect(mockRunAgentFn).toHaveBeenCalled();
|
||||
const callArgs = mockRunAgentFn.mock.calls[0];
|
||||
// First argument is workDir - should end with /test/project
|
||||
expect(callArgs[0]).toMatch(/\/test\/project$/);
|
||||
// First argument is workDir - should be normalized path to /test/project
|
||||
expect(callArgs[0]).toBe(normalizePath('/test/project'));
|
||||
});
|
||||
|
||||
it('skips worktree resolution when useWorktrees is false', async () => {
|
||||
|
||||
Reference in New Issue
Block a user