-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support for mapping HTTP client requests
- Loading branch information
1 parent
e3473fc
commit 55ef2e6
Showing
7 changed files
with
396 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`mapping http client requests 1`] = ` | ||
{ | ||
"classMap": [ | ||
{ | ||
"children": [ | ||
{ | ||
"children": [ | ||
{ | ||
"location": "./index.ts:18", | ||
"name": "makeRequests", | ||
"static": true, | ||
"type": "function", | ||
}, | ||
], | ||
"name": "", | ||
"type": "class", | ||
}, | ||
], | ||
"name": "index", | ||
"type": "package", | ||
}, | ||
], | ||
"eventUpdates": { | ||
"4": { | ||
"elapsed": 31.337, | ||
"event": "return", | ||
"id": 4, | ||
"parent_id": 3, | ||
"return_value": { | ||
"class": "Promise", | ||
"value": "Promise { undefined }", | ||
}, | ||
"thread_id": 0, | ||
}, | ||
}, | ||
"events": [ | ||
{ | ||
"defined_class": "", | ||
"event": "call", | ||
"id": 1, | ||
"method_id": "_export", | ||
"parameters": [ | ||
{ | ||
"class": "Object", | ||
"name": "target", | ||
"value": "{}", | ||
}, | ||
{ | ||
"class": "Object", | ||
"name": "all", | ||
"value": "{ | ||
SERVER_PORT: [Function: SERVER_PORT], | ||
TEST_HEADER_VALUE: [Function: TEST_HEADER_VALUE] | ||
}", | ||
}, | ||
], | ||
"static": true, | ||
"thread_id": 0, | ||
}, | ||
{ | ||
"elapsed": 31.337, | ||
"event": "return", | ||
"id": 2, | ||
"parent_id": 1, | ||
"thread_id": 0, | ||
}, | ||
{ | ||
"defined_class": "", | ||
"event": "call", | ||
"id": 3, | ||
"lineno": 18, | ||
"method_id": "makeRequests", | ||
"parameters": [], | ||
"path": "./index.ts", | ||
"static": true, | ||
"thread_id": 0, | ||
}, | ||
{ | ||
"elapsed": 31.337, | ||
"event": "return", | ||
"id": 4, | ||
"parent_id": 3, | ||
"return_value": { | ||
"class": "Promise", | ||
"value": "Promise { <pending> }", | ||
}, | ||
"thread_id": 0, | ||
}, | ||
{ | ||
"event": "call", | ||
"http_client_request": { | ||
"headers": { | ||
"host": "localhost:27628", | ||
"test-header": "This test header is added after ClientRequest creation", | ||
}, | ||
"request_method": "GET", | ||
"url": "http://localhost:27628/endpoint/one", | ||
}, | ||
"id": 5, | ||
"thread_id": 0, | ||
}, | ||
{ | ||
"elapsed": 31.337, | ||
"event": "return", | ||
"http_client_response": { | ||
"headers": { | ||
"transfer-encoding": "chunked", | ||
}, | ||
"status_code": 200, | ||
}, | ||
"id": 6, | ||
"parent_id": 5, | ||
"thread_id": 0, | ||
}, | ||
{ | ||
"event": "call", | ||
"http_client_request": { | ||
"headers": { | ||
"content-type": "application/json", | ||
"host": "localhost:27628", | ||
}, | ||
"request_method": "POST", | ||
"url": "http://localhost:27628/endpoint/two", | ||
}, | ||
"id": 7, | ||
"thread_id": 0, | ||
}, | ||
{ | ||
"elapsed": 31.337, | ||
"event": "return", | ||
"http_client_response": { | ||
"headers": { | ||
"content-type": "text/html", | ||
"transfer-encoding": "chunked", | ||
}, | ||
"status_code": 404, | ||
}, | ||
"id": 8, | ||
"parent_id": 7, | ||
"thread_id": 0, | ||
}, | ||
{ | ||
"event": "call", | ||
"http_client_request": { | ||
"headers": { | ||
"host": "localhost:27628", | ||
}, | ||
"request_method": "GET", | ||
"url": "http://localhost:27628/endpoint/three", | ||
}, | ||
"id": 9, | ||
"thread_id": 0, | ||
}, | ||
{ | ||
"elapsed": 31.337, | ||
"event": "return", | ||
"http_client_response": { | ||
"headers": { | ||
"content-type": "text/html", | ||
"transfer-encoding": "chunked", | ||
}, | ||
"status_code": 404, | ||
}, | ||
"id": 10, | ||
"parent_id": 9, | ||
"thread_id": 0, | ||
}, | ||
], | ||
"metadata": { | ||
"app": "appmap-node", | ||
"client": { | ||
"name": "appmap-node", | ||
"url": "https://github.com/getappmap/appmap-node", | ||
"version": "test node-appmap version", | ||
}, | ||
"language": { | ||
"engine": "Node.js", | ||
"name": "javascript", | ||
"version": "test node version", | ||
}, | ||
"name": "test process recording", | ||
"recorder": { | ||
"name": "process", | ||
"type": "process", | ||
}, | ||
}, | ||
"version": "1.12", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.