From c98ce7d464488dd59a6987cfaf08a4c7b31b96a2 Mon Sep 17 00:00:00 2001 From: grumblerchester Date: Fri, 6 Mar 2020 22:10:34 -0800 Subject: [PATCH] Adding tests for method `options` type definitions (#1996) Update tests. Co-authored-by: Xianming Zhong --- test/typescript/axios.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/typescript/axios.ts b/test/typescript/axios.ts index 0ee2fb8f06..e76a19a069 100644 --- a/test/typescript/axios.ts +++ b/test/typescript/axios.ts @@ -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', { params: { id: 12345 } }) axios.head('/user') .then(handleUserResponse) + .catch(handleError); + +axios.options('/user') + .then(handleUserResponse) .catch(handleError); axios.delete('/user') @@ -165,6 +173,10 @@ axios.head('/user') .then(handleStringResponse) .catch(handleError); +axios.options('/user') + .then(handleStringResponse) + .catch(handleError); + axios.delete('/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);