2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00

Adding tests for method options type definitions (#1996)

Update tests.

Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
This commit is contained in:
grumblerchester
2020-03-06 22:10:34 -08:00
committed by GitHub
parent 42eb9dfabc
commit c98ce7d464
+16
View File
@@ -78,6 +78,10 @@ axios.head('/user')
.then(handleResponse)
.catch(handleError);
axios.options('/user')
.then(handleResponse)
.catch(handleError);
axios.delete('/user')
.then(handleResponse)
.catch(handleError);
@@ -125,6 +129,10 @@ axios.get<User>('/user', { params: { id: 12345 } })
axios.head<User>('/user')
.then(handleUserResponse)
.catch(handleError);
axios.options<User>('/user')
.then(handleUserResponse)
.catch(handleError);
axios.delete<User>('/user')
@@ -165,6 +173,10 @@ axios.head<User, string>('/user')
.then(handleStringResponse)
.catch(handleError);
axios.options<User, string>('/user')
.then(handleStringResponse)
.catch(handleError);
axios.delete<User, string>('/user')
.then(handleStringResponse)
.catch(handleError);
@@ -209,6 +221,10 @@ instance1.get('/user?id=12345')
.then(handleResponse)
.catch(handleError);
instance1.options('/user')
.then(handleResponse)
.catch(handleError);
instance1.get('/user', { params: { id: 12345 } })
.then(handleResponse)
.catch(handleError);