From b7d63a6e8d85d16ae863fff0d801b65ca1d9c7a3 Mon Sep 17 00:00:00 2001 From: Suzanne Aitchison Date: Tue, 21 Sep 2021 10:52:54 +0100 Subject: [PATCH] workaround getComputedStyle issues in all jest tests (#14737) --- .../organization/__tests__/OrganizationPicker.test.jsx | 5 ----- testSetup.js | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/javascript/organization/__tests__/OrganizationPicker.test.jsx b/app/javascript/organization/__tests__/OrganizationPicker.test.jsx index 6ad58cd1c..bc29ec7ca 100644 --- a/app/javascript/organization/__tests__/OrganizationPicker.test.jsx +++ b/app/javascript/organization/__tests__/OrganizationPicker.test.jsx @@ -15,11 +15,6 @@ const organizations = [ ]; describe('', () => { - beforeAll(() => { - // TODO: Remove this once https://github.com/nickcolley/jest-axe/issues/147 is fixed. - window.getComputedStyle = () => {}; - }); - it('should have no a11y violations', async () => { const { container } = render( getComputedStyle(elt); + process.on('unhandledRejection', (error) => { // Errors thrown here are typically fetch responses that have not been mocked. throw error;