@mendeley/api
Advanced tools
Comparing version 6.4.0 to 6.5.0
@@ -100,2 +100,7 @@ 'use strict'; | ||
// pass-through axios property for how querystring params are serialized. | ||
if(options.paramsSerializer) { | ||
request.paramsSerializer = options.paramsSerializer; | ||
} | ||
return Request.create(request, settings) | ||
@@ -102,0 +107,0 @@ .send() |
{ | ||
"name": "@mendeley/api", | ||
"version": "6.4.0", | ||
"version": "6.5.0", | ||
"description": "Mendeley API JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -70,2 +70,25 @@ 'use strict'; | ||
it('should allow setting the paramsSerializer for different end points', function() { | ||
var requestFunction = utils.requestFun(assign({ | ||
method: 'GET', | ||
resource: '/test/', | ||
paramsSerializer: 'injected_paramsSerializer' | ||
}, defaultOptions)); | ||
requestFunction(); | ||
expect(requestCreateSpy).toHaveBeenCalledWith({ | ||
method: 'GET', | ||
responseType: 'json', | ||
url: 'https://api.mendeley.com/test/', | ||
headers: {}, | ||
params: undefined, | ||
paramsSerializer: 'injected_paramsSerializer' | ||
}, { | ||
authFlow: authFlow, | ||
maxRetries: 1 | ||
}); | ||
}); | ||
it('should construct the url from supplied pattern and arguments', function() { | ||
@@ -72,0 +95,0 @@ var requestFunction = utils.requestFun(assign({ |
1520852
15462