File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
configs/mocha-config-compass/register Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,25 @@ Object.assign(tabbable, {
3535 origTabbable . isTabbable ( node , { ...options , displayCheck : 'none' } ) ,
3636} ) ;
3737
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+ this . style . display = '' ;
45+ } ,
46+ showModal ( ) {
47+ this . open = true ;
48+ this . style . display = '' ;
49+ } ,
50+ close ( returnValue ) {
51+ this . open = false ;
52+ this . returnValue = returnValue ;
53+ this . style . display = 'none' ;
54+ } ,
55+ } ) ;
56+
3857// leafygreen (through `clipboard` library) uses deprecated API check that is
3958// not working in jsdom if copy / paste APIs are supported
4059if ( ! window . document . queryCommandSupported ) {
You can’t perform that action at this time.
0 commit comments