diff --git a/sdk/test-utils/recorder/test/utils/utils.ts b/sdk/test-utils/recorder/test/utils/utils.ts index 51c1f8f2d36d..3ec6a3210a3a 100644 --- a/sdk/test-utils/recorder/test/utils/utils.ts +++ b/sdk/test-utils/recorder/test/utils/utils.ts @@ -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"; @@ -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 @@ -39,7 +39,7 @@ export async function makeRequestAndVerifyResponse( method: HttpMethods; }, expectedResponse: { [key: string]: unknown } | undefined -) { +): Promise { const req = createPipelineRequest({ url: request.url ?? getTestServerUrl() + request.path, body: request.body,