Skip to content

Commit f2ab6c3

Browse files
committed
mock test changes
1 parent 2d80227 commit f2ab6c3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/test/testing/testController/server.unit.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { OutputChannel, Uri } from 'vscode';
99
import { IPythonExecutionFactory, IPythonExecutionService } from '../../../client/common/process/types';
1010
import { PythonTestServer } from '../../../client/testing/testController/common/server';
1111
import { ITestDebugLauncher } from '../../../client/testing/common/types';
12-
import { createDeferred } from '../../../client/common/utils/async';
12+
import { IJSONRPCMessage, jsonRPCProcessor } from '../../../client/testing/testController/common/utils';
1313

1414
suite('Python Test Server', () => {
1515
const fakeUuid = 'fake-uuid';
@@ -155,4 +155,14 @@ suite('Python Test Server', () => {
155155
await deferred.promise;
156156
assert.deepStrictEqual(eventData, '');
157157
});
158+
test('jsonRPCProcessor', async () => {
159+
const rawDataString = '';
160+
const expected: IJSONRPCMessage = {
161+
headers: new Map<string, string>(),
162+
extractedData: 'string',
163+
remainingRawData: 'string',
164+
};
165+
const output: IJSONRPCMessage = jsonRPCProcessor(rawDataString);
166+
assert.deepStrictEqual(output, expected);
167+
});
158168
});

0 commit comments

Comments
 (0)