fix: adjust how passed in axios configs are combined with default axios configs in client constructor

This commit is contained in:
StevanFreeborn
2023-02-13 23:37:15 -06:00
parent 64dfa6f1e1
commit d6c6579129
2 changed files with 20 additions and 6 deletions
+10
View File
@@ -116,6 +116,16 @@ describe('OnspringClient', function () {
expect(new OnspringClient(baseUrl, apiKey)).to.have.property('_client');
});
it('should create a new instance of an onspring client when passed an axios config object', function () {
const config = {
validateStatus: function (status) {
return status >= 200 && status < 300;
},
};
expect(() => new OnspringClient(baseUrl, apiKey, config)).to.not.throw();
});
describe('canConnect', function () {
it('should be defined', function () {
expect(new OnspringClient(baseUrl, apiKey).canConnect).to.not.be