Skip to content

Commit

Permalink
feat: export mergeConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincennis committed Oct 18, 2022
1 parent 9bd5321 commit 6c17948
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ axios.spread = spread;
// Expose isAxiosError
axios.isAxiosError = isAxiosError;

// Expose mergeConfig
axios.mergeConfig = mergeConfig;

axios.formToJSON = thing => {
return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
};
Expand Down
4 changes: 4 additions & 0 deletions test/specs/api.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ describe('static api', function () {
it('should have isAxiosError properties', function () {
expect(typeof axios.isAxiosError).toEqual('function');
});

it('should have mergeConfig properties', function () {
expect(typeof axios.mergeConfig).toEqual('function');
});
});

describe('instance api', function () {
Expand Down
1 change: 1 addition & 0 deletions test/specs/instance.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('instance', function () {
'spread',
'getUri',
'isAxiosError',
'mergeConfig',
'VERSION',
'default',
'toFormData',
Expand Down

0 comments on commit 6c17948

Please sign in to comment.