We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3c8839 commit 9137a9bCopy full SHA for 9137a9b
configs/mocha-config-compass/register/jsdom-extra-mocks-register.js
@@ -35,6 +35,21 @@ Object.assign(tabbable, {
35
origTabbable.isTabbable(node, { ...options, displayCheck: 'none' }),
36
});
37
38
+// Workaround for missing HTMLDialogElement in jsdom
39
+// See https://github.com/jsdom/jsdom/issues/3294
40
+
41
+Object.assign(HTMLDialogElement.prototype, {
42
+ show() {
43
+ this.open = true;
44
+ },
45
+ showModal() {
46
47
48
+ close() {
49
+ this.open = false;
50
51
+});
52
53
// leafygreen (through `clipboard` library) uses deprecated API check that is
54
// not working in jsdom if copy / paste APIs are supported
55
if (!window.document.queryCommandSupported) {
0 commit comments