Skip to content

Commit 98bbd7c

Browse files
fix(mock-doc): expose ShadowRoot and DocumentFragment globals (#5827)
1 parent cf6a450 commit 98bbd7c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/mock-doc/global.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { MockDocumentFragment } from './document-fragment';
12
import {
23
MockAnchorElement,
34
MockBaseElement,
@@ -156,14 +157,16 @@ const WINDOW_PROPS = [
156157

157158
const GLOBAL_CONSTRUCTORS: [string, any][] = [
158159
['CustomEvent', MockCustomEvent],
160+
['DocumentFragment', MockDocumentFragment],
161+
['DOMParser', MockDOMParser],
159162
['Event', MockEvent],
160-
['Headers', MockHeaders],
161163
['FocusEvent', MockFocusEvent],
164+
['Headers', MockHeaders],
162165
['KeyboardEvent', MockKeyboardEvent],
163166
['MouseEvent', MockMouseEvent],
164167
['Request', MockRequest],
165168
['Response', MockResponse],
166-
['DOMParser', MockDOMParser],
169+
['ShadowRoot', MockDocumentFragment],
167170

168171
['HTMLAnchorElement', MockAnchorElement],
169172
['HTMLBaseElement', MockBaseElement],

0 commit comments

Comments
 (0)