Skip to content

Commit 207e837

Browse files
committed
feat(test): add supportsShadowDom
1 parent 2d5f282 commit 207e837

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

src/declarations/testing.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ declare global {
1313
*/
1414
toEqualHtml(expectHtml: string): void;
1515

16+
/**
17+
* Compares HTML light DOKM only, but first normalizes the HTML so all
18+
* whitespace, attribute order and css class order are
19+
* the same. When given an element, it will compare
20+
* the element's `outerHTML`. When given a Document Fragment,
21+
* such as a Shadow Root, it'll compare its `innerHTML`.
22+
* Otherwise it'll compare two strings representing HTML.
23+
*/
24+
toEqualLightHtml(expectLightHtml: string): void;
25+
1626
/**
1727
* When given an element, it'll compare the element's
1828
* `textContent`. Otherwise it'll compare two strings. This
@@ -488,7 +498,7 @@ export interface NewSpecPageOptions {
488498
hydrateClientSide?: boolean;
489499
hydrateServerSide?: boolean;
490500
referrer?: string;
491-
serializedShadowDom?: boolean;
501+
supportsShadowDom?: boolean;
492502
url?: string;
493503
userAgent?: string;
494504
autoApplyChanges?: boolean;

src/testing/spec-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function newSpecPage(opts: d.NewSpecPageOptions): Promise<d.SpecPag
2828
if (opts.hydrateServerSide) {
2929
platform.supportsShadowDom = false;
3030
} else {
31-
if (opts.serializedShadowDom === false) {
31+
if (opts.supportsShadowDom === false) {
3232
platform.supportsShadowDom = false;
3333
} else {
3434
platform.supportsShadowDom = true;

0 commit comments

Comments
 (0)