1
In Test, how does one send custom GET request that is not the specific request the test is for?
Source: Kong/insomnia#6519 · opened by @davehouser1
I need my test to do the following:
1) perform a const response = await insomnia.send() for the request I am testing
2) Construct and send another request differnet from the request test. But every time I try to do this it fails
I get a failed to find request
I can only assume that I am using insomnia.send() incorrectly.
Is there a way to send a different request in a test? if so how?
EDIT: Well I hacked a solution together, this is the only way I could get this to work by using a new Promise with http module and parsing the data manually. The following code works and will print out the response payload, and also an attribute from the payload from console. Is there an easier way to do this??
1) perform a const response = await insomnia.send() for the request I am testing
2) Construct and send another request differnet from the request test. But every time I try to do this it fails
I get a failed to find request
I can only assume that I am using insomnia.send() incorrectly.
Is there a way to send a different request in a test? if so how?
EDIT: Well I hacked a solution together, this is the only way I could get this to work by using a new Promise with http module and parsing the data manually. The following code works and will print out the response payload, and also an attribute from the payload from console. Is there an easier way to do this??
No pledges yet. Be the first to back this.
Comments
Similar requests
How to avoid Error: failed to find workspace while running inso CLI?
1 vote · 0 comments
Inso CLI does not support multipart form structure in requests
3 votes · 0 comments
GraphQL query variable as input in Unit Test
3 votes · 0 comments
JSONPath/XPath access to Environment Variables
1 vote · 0 comments
Integrate trigger behavior with unit tests
3 votes · 0 comments
No comments yet.