Skip to content

Commit c47033f

Browse files
committed
Update JSDoc comments.
1 parent 1594b81 commit c47033f

File tree

1 file changed

+13
-5
lines changed
  • packages/node-integration-tests/utils

1 file changed

+13
-5
lines changed

packages/node-integration-tests/utils/index.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type TestServerConfig = {
1616

1717
export type DataCollectorOptions = {
1818
// The expected amount of requests to the envelope endpoint.
19-
// If the amount of sentrequests is lower than`count`, this function will not resolve.
19+
// If the amount of sent requests is lower than `count`, this function will not resolve.
2020
count?: number;
2121

2222
// The method of the request.
@@ -90,7 +90,7 @@ export const parseEnvelope = (body: string): Array<Record<string, unknown>> => {
9090
/**
9191
* Intercepts and extracts up to a number of requests containing Sentry envelopes.
9292
*
93-
* @param {TestServerConfig} config The url, server instance and the nock scope.
93+
* @param {TestServerConfig} config The url and the server instance.
9494
* @param {DataCollectorOptions} options
9595
* @returns The intercepted envelopes.
9696
*/
@@ -174,9 +174,10 @@ const makeRequest = async (method: 'get' | 'post', url: string): Promise<void> =
174174
};
175175

176176
/**
177-
* Sends a get request to given URL, with optional headers
177+
* Sends a get request to given URL, with optional headers. Returns the response.
178+
* Ends the server instance and flushes the Sentry event queue.
178179
*
179-
* @param {TestServerConfig} config The url, server instance and the nock scope.
180+
* @param {TestServerConfig} config The url and the server instance.
180181
* @param {Record<string, string>} [headers]
181182
* @return {*} {Promise<any>}
182183
*/
@@ -192,7 +193,7 @@ export const getAPIResponse = async (config: TestServerConfig, headers?: Record<
192193
/**
193194
* Intercepts and extracts a single request containing a Sentry envelope
194195
*
195-
* @param {TestServerConfig} config The url, server instance and the nock scope.
196+
* @param {TestServerConfig} config The url and the server instance.
196197
* @param {DataCollectorOptions} options
197198
* @returns The extracted envelope.
198199
*/
@@ -240,6 +241,13 @@ export async function runServer(
240241
return { url, server };
241242
}
242243

244+
/**
245+
* Sends a get request to given URL.
246+
* Flushes the Sentry event queue.
247+
*
248+
* @param {string} url
249+
* @return {*} {Promise<void>}
250+
*/
243251
export async function runScenario(url: string): Promise<void> {
244252
await axios.get(url);
245253
await Sentry.flush();

0 commit comments

Comments
 (0)