diff --git a/x-pack/plugins/reporting/public/panel_actions/get_csv_panel_action.test.ts b/x-pack/plugins/reporting/public/panel_actions/get_csv_panel_action.test.ts index 105c5cd109533..f07235742a1d3 100644 --- a/x-pack/plugins/reporting/public/panel_actions/get_csv_panel_action.test.ts +++ b/x-pack/plugins/reporting/public/panel_actions/get_csv_panel_action.test.ts @@ -18,7 +18,11 @@ describe('GetCsvReportPanelAction', () => { beforeAll(() => { if (typeof window.URL.revokeObjectURL === 'undefined') { - Object.defineProperty(window.URL, 'revokeObjectURL', { value: () => {} }); + Object.defineProperty(window.URL, 'revokeObjectURL', { + configurable: true, + writable: true, + value: () => {}, + }); } }); diff --git a/x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/auto_download.test.tsx b/x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/auto_download.test.tsx index 53dcf986d395c..be84c37d40606 100644 --- a/x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/auto_download.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/value_lists_management_modal/auto_download.test.tsx @@ -12,8 +12,8 @@ import { AutoDownload } from './auto_download'; describe('AutoDownload', () => { beforeEach(() => { - // our DOM environment lacks this function that our component needs Object.defineProperty(globalNode.window.URL, 'revokeObjectURL', { + configurable: true, writable: true, value: jest.fn(), });