Skip to content

Commit

Permalink
fix(mock-doc): expose ShadowRoot and DocumentFragment globals
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduy1407 committed Dec 14, 2024
1 parent ff832ca commit 642de46
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/mock-doc/global.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { MockDocumentFragment } from './document-fragment';
import {
MockAnchorElement,
MockBaseElement,
Expand Down Expand Up @@ -156,14 +157,16 @@ const WINDOW_PROPS = [

const GLOBAL_CONSTRUCTORS: [string, any][] = [
['CustomEvent', MockCustomEvent],
['DocumentFragment', MockDocumentFragment],
['DOMParser', MockDOMParser],
['Event', MockEvent],
['Headers', MockHeaders],
['FocusEvent', MockFocusEvent],
['Headers', MockHeaders],
['KeyboardEvent', MockKeyboardEvent],
['MouseEvent', MockMouseEvent],
['Request', MockRequest],
['Response', MockResponse],
['DOMParser', MockDOMParser],
['ShadowRoot', MockDocumentFragment],

['HTMLAnchorElement', MockAnchorElement],
['HTMLBaseElement', MockBaseElement],
Expand Down

0 comments on commit 642de46

Please sign in to comment.