Skip to content

Commit bfd3531

Browse files
cynarlabclaude
andcommitted
test(proxy): platform-neutral fixture paths in the two new worker tests (#790)
The entry-stop and breakpoint-source worker tests fed `C:\p\...` paths through the configuration phase, which canonicalizes with path.resolve; on CI's ubuntu lane a Windows path is relative and came back prefixed with the runner's cwd, failing both. `path.resolve('/p/...')` is absolute on both platforms (`C:\p\...` on Windows). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 42092fc commit bfd3531

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎tests/proxy/dap-proxy-worker-breakpoint-source.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* knows which file each adapter id belongs to and fills the `source` in before forwarding.
99
*/
1010
import { EventEmitter } from 'events';
11+
import path from 'path';
1112
import { describe, it, expect, beforeEach, vi } from 'vitest';
1213
import { DefaultAdapterPolicy } from '@debugmcp/shared';
1314
import { DapProxyWorker } from '../../src/proxy/dap-proxy-worker.js';
@@ -16,7 +17,9 @@ import { createMockDapClient } from '../test-utils/mocks/dap-client.js';
1617
import { createMockLogger } from '../test-utils/helpers/test-dependencies.js';
1718
import { createMockFileSystem, createMockProcessSpawner } from '../test-utils/mocks/dap-proxy-doubles.js';
1819

19-
const FILE = 'C:\\p\\hello.dart';
20+
// Absolute on both platforms (the worker canonicalizes with path.resolve, which treats a
21+
// Windows path as relative on Linux — CI's ubuntu lane).
22+
const FILE = path.resolve('/p/hello.dart');
2023
type Sent = Record<string, unknown>;
2124

2225
describe('DapProxyWorker breakpoint events without source (issue #790)', () => {

‎tests/proxy/dap-proxy-worker-entry-stop.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* breakpoint list, and relabels its first hit as the entry stop.
99
*/
1010
import { EventEmitter } from 'events';
11+
import path from 'path';
1112
import { describe, it, expect, beforeEach, vi } from 'vitest';
1213
import { DefaultAdapterPolicy, type AdapterPolicy } from '@debugmcp/shared';
1314
import { DapProxyWorker } from '../../src/proxy/dap-proxy-worker.js';
@@ -16,7 +17,9 @@ import { createMockDapClient } from '../test-utils/mocks/dap-client.js';
1617
import { createMockLogger } from '../test-utils/helpers/test-dependencies.js';
1718
import { createMockFileSystem, createMockProcessSpawner } from '../test-utils/mocks/dap-proxy-doubles.js';
1819

19-
const PROGRAM = 'C:\\p\\bin\\app.dart';
20+
// Absolute on both platforms (the worker canonicalizes with path.resolve, which treats a
21+
// Windows path as relative on Linux — CI's ubuntu lane).
22+
const PROGRAM = path.resolve('/p/bin/app.dart');
2023
const SOURCE = "import 'dart:io';\n\nFuture<void> main(List<String> args) async {\n print('x');\n}\n";
2124

2225
type Sent = Record<string, unknown>;

0 commit comments

Comments
 (0)