How to test this piece in JEST?

static get(action, params = {}) {

 return new Promise((resolve, reject) => {
 fetch(UrlHelper.apiUrl(action, params), {
 credentials: 'same-origin'
})
 .then(response => {
 return Api.checkStatus(resolve, reject, response)
})
 .then(([ ok, response ]) => {
 return ok ? resolve(response) : reject(response);
});
});
 }


How to test this piece in JEST ?
It's part of the API that there are no queries in fact do not need
June 5th 19 at 21:59

Find more questions by tags ReactTesting software