Skip to content

Commit

Permalink
- fixes unit test implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Jul 3, 2023
1 parent 0becc8a commit cb1e3f8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/http/fetch/test/common/fetchRequestAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("FetchRequestAdapter.ts", () => {
const requestInformation = new RequestInformation();
requestInformation.URL = "https://www.example.com";
requestInformation.httpMethod = HttpMethod.GET;
await requestAdapter.sendNoResponseContentAsync(requestInformation, undefined, undefined);
await requestAdapter.sendNoResponseContentAsync(requestInformation, undefined);
assert.equal(executeFetchCount, 2);
});
});
Expand All @@ -59,7 +59,7 @@ describe("FetchRequestAdapter.ts", () => {
const requestInformation = new RequestInformation();
requestInformation.URL = "https://www.example.com";
requestInformation.httpMethod = HttpMethod.GET;
const result = await requestAdapter.sendPrimitiveAsync(requestInformation, "ArrayBuffer", undefined, undefined);
const result = await requestAdapter.sendPrimitiveAsync(requestInformation, "ArrayBuffer", undefined);
assert.isDefined(result);
});
}
Expand All @@ -78,7 +78,7 @@ describe("FetchRequestAdapter.ts", () => {
const requestInformation = new RequestInformation();
requestInformation.URL = "https://www.example.com";
requestInformation.httpMethod = HttpMethod.GET;
const result = await requestAdapter.sendPrimitiveAsync(requestInformation, "ArrayBuffer", undefined, undefined);
const result = await requestAdapter.sendPrimitiveAsync(requestInformation, "ArrayBuffer", undefined);
assert.isUndefined(result);
});
}
Expand All @@ -97,7 +97,7 @@ describe("FetchRequestAdapter.ts", () => {
const requestInformation = new RequestInformation();
requestInformation.URL = "https://www.example.com";
requestInformation.httpMethod = HttpMethod.GET;
const result = await requestAdapter.sendAsync(requestInformation, createMockEntityFromDiscriminatorValue, undefined, undefined);
const result = await requestAdapter.sendAsync(requestInformation, createMockEntityFromDiscriminatorValue, undefined);
assert.isUndefined(result);
});
}
Expand All @@ -118,7 +118,7 @@ describe("FetchRequestAdapter.ts", () => {
const requestInformation = new RequestInformation();
requestInformation.URL = "https://www.example.com";
requestInformation.httpMethod = HttpMethod.GET;
const result = await requestAdapter.sendAsync(requestInformation, createMockEntityFromDiscriminatorValue, undefined, undefined);
const result = await requestAdapter.sendAsync(requestInformation, createMockEntityFromDiscriminatorValue, undefined);
assert.isDefined(result);
});
}
Expand All @@ -139,7 +139,7 @@ describe("FetchRequestAdapter.ts", () => {
requestInformation.httpMethod = HttpMethod.GET;

try {
await requestAdapter.sendNoResponseContentAsync(requestInformation, undefined, undefined);
await requestAdapter.sendNoResponseContentAsync(requestInformation, undefined);
assert.fail("Should have thrown an error");
} catch (error) {
assert.equal(error.responseStatusCode, 500);
Expand Down

0 comments on commit cb1e3f8

Please sign in to comment.