Skip to content

Commit 835e00f

Browse files
fix(mock-doc): add missing methods to the element mock (#3480)
add the following method stubs to `MockElement`: - animate - requestFullscreen - scrollBy - scrollTo - scrollIntoView all functions accept zero arguments and return nothing (`undefined`). if in the future that premise needs to be revisited, the team will update the function signatures at their discretion
1 parent c4d894f commit 835e00f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/mock-doc/node.ts

+15
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,9 @@ export class MockElement extends MockNode {
715715
this.setAttributeNS(null, 'title', value);
716716
}
717717

718+
animate() {
719+
/**/
720+
}
718721
onanimationstart() {
719722
/**/
720723
}
@@ -979,6 +982,18 @@ export class MockElement extends MockNode {
979982
onwheel() {
980983
/**/
981984
}
985+
requestFullscreen() {
986+
/**/
987+
}
988+
scrollBy() {
989+
/**/
990+
}
991+
scrollTo() {
992+
/**/
993+
}
994+
scrollIntoView() {
995+
/**/
996+
}
982997

983998
override toString(opts?: SerializeNodeToHtmlOptions) {
984999
return serializeNodeToHtml(this as any, opts);

0 commit comments

Comments
 (0)