@@ -156,11 +156,20 @@ suite('Python Test Server', () => {
156
156
assert . deepStrictEqual ( eventData , '' ) ;
157
157
} ) ;
158
158
test ( 'jsonRPCProcessor' , async ( ) => {
159
- const rawDataString = '' ;
159
+ const rawDataString = `Content-Length: 160
160
+ Content-Type: application/json
161
+ Request-uuid: xxxxxx-1012-xxxx-xxxx-xxx
162
+
163
+ {"cwd": "/path/to/folder", "status": "success", "tests": {"name": "test", "path": "/path/to/test", "type_": "folder", "children": []}], "id_": "/path/to/test"}}` ;
164
+ const headers = new Map < string , string > ( [
165
+ [ 'Content-Length' , '160' ] ,
166
+ [ 'Content-Type' , 'application/json' ] ,
167
+ [ 'Request-uuid' , 'xxxxxx-1012-xxxx-xxxx-xxx' ] ,
168
+ ] ) ;
160
169
const expected : IJSONRPCMessage = {
161
- headers : new Map < string , string > ( ) ,
162
- extractedData : 'string' ,
163
- remainingRawData : 'string ' ,
170
+ headers,
171
+ extractedData : `{"cwd": "/path/to/folder", "status": "success", "tests": {"name": "test", "path": "/path/to/test", "type_": "folder", "children": []}], "id_": "/path/to/test"}}` ,
172
+ remainingRawData : '' ,
164
173
} ;
165
174
const output : IJSONRPCMessage = jsonRPCProcessor ( rawDataString ) ;
166
175
assert . deepStrictEqual ( output , expected ) ;
0 commit comments