Add test for headers change

This commit is contained in:
Diogo Franco (Kovensky) 2016-11-28 13:22:35 +09:00
parent b733dcefe8
commit ae053e2298

View File

@ -80,7 +80,11 @@ var axiosInstance = axios.create({
timeout: 1000
});
axiosInstance.request({url: "issues/1"});
axiosInstance.request({url: "issues/1"}).then(res => {
if (res.headers['content-type'].startsWith('application/json')) {
throw new Error('Unexpected content-type');
}
});
axios.all<Repository, Repository>([getRepoDetails, getRepoDetails]).then(([repo1, repo2]) => {
var sumIds = repo1.data.id + repo2.data.id;