mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05:00
It's possible for a call to fetch to trigger then "then" callback even thought the response is an error [1]. We should test for both scenarios, since they are handled differently. To avoid duplicating the tests, I've used Jest's parameterisation feature [2]. [1]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch [2]: https://jestjs.io/docs/api#testeachtablename-fn-timeout