Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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