This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ import { StopGapWidgetDriver } from "../../../src/stores/widgets/StopGapWidgetDr
4949import { stubClient } from "../../test-utils" ;
5050import { ModuleRunner } from "../../../src/modules/ModuleRunner" ;
5151import dis from "../../../src/dispatcher/dispatcher" ;
52+ import Modal from "../../../src/Modal" ;
5253import SettingsStore from "../../../src/settings/SettingsStore" ;
5354
5455describe ( "StopGapWidgetDriver" , ( ) => {
@@ -68,6 +69,10 @@ describe("StopGapWidgetDriver", () => {
6869 "!1:example.org" ,
6970 ) ;
7071
72+ jest . spyOn ( Modal , "createDialog" ) . mockImplementation ( ( ) => {
73+ throw new Error ( "Should not have to create a dialog" ) ;
74+ } ) ;
75+
7176 beforeEach ( ( ) => {
7277 stubClient ( ) ;
7378 client = mocked ( MatrixClientPeg . safeGet ( ) ) ;
@@ -127,7 +132,6 @@ describe("StopGapWidgetDriver", () => {
127132 "org.matrix.msc4157.update_delayed_event" ,
128133 ] ) ;
129134
130- // As long as this resolves, we'll know that it didn't try to pop up a modal
131135 const approvedCapabilities = await driver . validateCapabilities ( requestedCapabilities ) ;
132136 expect ( approvedCapabilities ) . toEqual ( requestedCapabilities ) ;
133137 } ) ;
You can’t perform that action at this time.
0 commit comments