Skip to content

Commit

Permalink
bump version to 3.1.0, fix some linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjan1999 committed Jul 29, 2019
1 parent 256457d commit e5d7aa1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/UppercaseProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const UppercaseProxy = (clientMessage) => {
axios.interceptors.response.use((config) => config);

// requesting data from server
let axiosPromise = axios.post("/web-service-url/", { data: clientMessage });
const axiosPromise = axios.post("/web-service-url/", { data: clientMessage });

// converting server response to upper case
const axiosPromiseConverted = axiosPromise.then((serverData) =>
Expand Down
3 changes: 1 addition & 2 deletions test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ describe("MockAxios", () => {
MockAxios.mockError(undefined, undefined, true),
).not.toThrow();
});

it("`mockError` should pass down the error object", () => {
class CustomError extends Error {}
const promise = MockAxios.post();
Expand All @@ -246,7 +246,6 @@ describe("MockAxios", () => {
MockAxios.mockError(new CustomError("custom error"));

expect(catchFn).toHaveBeenCalled();
console.log(catchFn.mock.calls[0]);
expect(catchFn.mock.calls[0][0]).toBeInstanceOf(CustomError);
});
});
Expand Down

0 comments on commit e5d7aa1

Please sign in to comment.