Skip to content

Commit

Permalink
[Recorder] Add return types to test/utils methods (Azure#20510)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshaNalluru authored Feb 23, 2022
1 parent c629e05 commit d70157c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdk/test-utils/recorder/test/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createPipelineRequest, HttpMethods } from "@azure/core-rest-pipeline";
import { createPipelineRequest, HttpMethods, PipelineResponse } from "@azure/core-rest-pipeline";
import { expect } from "chai";
import { env } from "../../src";
import { isLiveMode, TestMode } from "../../src/utils/utils";
Expand All @@ -14,7 +14,7 @@ export const setTestMode = (mode: TestMode): TestMode => {
* Returns the test server url
* Acts as the endpoint [ Works as a substitute to the actual Azure Services ]
*/
export function getTestServerUrl() {
export function getTestServerUrl(): string {
// utils/server.ts creates a localhost server at port 8080
// - In "live" mode, we are hitting directly the localhost endpoint
// - In "record" and "playback" modes, we need to hit the localhost of the host network
Expand All @@ -39,7 +39,7 @@ export async function makeRequestAndVerifyResponse(
method: HttpMethods;
},
expectedResponse: { [key: string]: unknown } | undefined
) {
): Promise<PipelineResponse> {
const req = createPipelineRequest({
url: request.url ?? getTestServerUrl() + request.path,
body: request.body,
Expand Down

0 comments on commit d70157c

Please sign in to comment.