Skip to content

Commit c997d69

Browse files
committed
Cleanup test and try to fix it failing on windows
I guess this is what I get for trusting AI at midnight.
1 parent ac45ac4 commit c997d69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/unittest/noConfigDebugInit.unit.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ suite('setup for no-config debug scenario', function () {
1919
let context: TypeMoq.IMock<IExtensionContext>;
2020
let noConfigScriptsDir: string;
2121
let bundledDebugPath: string;
22+
let noConfigEndpointDir: string;
2223
let DEBUGPY_ADAPTER_ENDPOINTS = 'DEBUGPY_ADAPTER_ENDPOINTS';
2324
let BUNDLED_DEBUGPY_PATH = 'BUNDLED_DEBUGPY_PATH';
2425
let workspaceUriStub: sinon.SinonStub;
@@ -33,6 +34,7 @@ suite('setup for no-config debug scenario', function () {
3334
context.setup((c) => c.subscriptions).returns(() => []);
3435
noConfigScriptsDir = path.join(context.object.extensionPath, 'bundled/scripts/noConfigScripts');
3536
bundledDebugPath = path.join(context.object.extensionPath, 'bundled/libs/debugpy');
37+
noConfigEndpointDir = path.join(context.object.extensionPath, '.noConfigDebugAdapterEndpoints');
3638

3739
// Stub crypto.randomBytes with proper typing
3840
let randomBytesStub = sinon.stub(crypto, 'randomBytes');
@@ -195,7 +197,7 @@ suite('setup for no-config debug scenario', function () {
195197
sinon.assert.calledOnce(createFileSystemWatcherFunct);
196198
const expectedPattern = sinon.match
197199
.instanceOf(RelativePattern)
198-
.and(sinon.match.has('base', path.join(os.tmpdir(), '.noConfigDebugAdapterEndpoints')))
200+
.and(sinon.match.has('base', noConfigEndpointDir))
199201
.and(sinon.match.has('pattern', sinon.match(/^endpoint-[0-9a-f]{16}\.txt$/)));
200202
sinon.assert.calledWith(createFileSystemWatcherFunct, expectedPattern);
201203
});

0 commit comments

Comments
 (0)