docbrown/testSetup.js
Nick Taylor d623157eee
Fixed some frontend tests causing unhandled rejection errors (#11627)
* Fixed unhandled rejection in <ImageUploader /> test.

* Fixed <FollowUsers /> tests.

* Fixed the tests for the <RequestManager /> component.

* Fixed unhandled rejection in search utilities.

* Added an unhandledRejection listener so tests will fail if a Promise fails.

* Added a comment about why you might get an unhandled rejection exception.
2020-11-26 06:11:25 -05:00

8 lines
245 B
JavaScript

/* eslint-env node */
import 'jest-axe/extend-expect';
import './app/assets/javascripts/lib/xss';
process.on('unhandledRejection', (error) => {
// Errors thrown here are typically fetch responses that have not been mocked.
throw error;
});