From 96ff69af5ed06adf60766637b7160479e3b94bf6 Mon Sep 17 00:00:00 2001 From: xdan Date: Thu, 12 Oct 2023 13:45:23 +0300 Subject: [PATCH] In the new revisions mechanism for catching Abort error has been changed --- jest.setup.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jest.setup.ts b/jest.setup.ts index 9a8bf15..78f0e0d 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -64,6 +64,12 @@ module.exports = async function () { const context: any = { ...dom.window, Node: dom.window.Node, + DOMException: class extends Error { + constructor(message: string, name: string) { + super(message); + this.name = name; + } + }, MouseEvent: dom.window.MouseEvent, Image: dom.window.Image, HTMLElement: dom.window.HTMLElement,