We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29beee2 commit 9bd105cCopy full SHA for 9bd105c
src/__tests__/httpClientException.spec.ts
@@ -1,16 +1,14 @@
1
-import { HttpClientException } from "../";
+import { HttpClientException } from "../";
2
3
describe("HttpClientException", () => {
4
it("should export HttpClientException as a class", () => {
5
expect(typeof HttpClientException).toBe("function");
6
7
const error = new HttpClientException({
8
- message: `HTTP Exception: `,
9
- statusCode: 422,
10
- errorCode: undefined,
11
- responseHeaders: undefined,
12
- responseBody: "{\"status\": 422, \"message\": \"Test error\"}",
13
- });
+ message: "Test error",
+ statusCode: 422,
+ responseBody: JSON.stringify({ status: 422, message: "Test error" }),
+ });
14
15
expect(error).toBeInstanceOf(HttpClientException);
16
expect(error.statusCode).toBe(422);
0 commit comments