Promises are a great way of doing async programming. But testing with promises can be a bit cumbersome, even with the use of the arrow functions syntax. Recently I've found a small and nice package to help to stub tests using Sinon, and the library is sinon-stub-promise. function fetchMovieData() { return fetch("/movies") .then(res => { return res.json(); }) .then(movies => { return movies; }); }