@@ -175,37 +175,6 @@ describe('AppListenerManager media call events', () => {
175175 assert . deepStrictEqual ( outcome , { prevented : false , context : { ...context , features : [ 'audio' , 'hold' ] } } ) ;
176176 } ) ;
177177
178- it ( 'does not run the handler of an app whose check opted out' , async ( ) => {
179- let executed = false ;
180- const outcome = await runPreCallCreated ( [
181- mockApp ( 'opting-out' , {
182- [ AppMethod . CHECK_PRE_MEDIA_CALL_CREATED ] : ( ) => false ,
183- [ AppMethod . EXECUTE_PRE_MEDIA_CALL_CREATED ] : ( ) => {
184- executed = true ;
185- return EventResult . prevent ( { reason : 'should never run' } ) ;
186- } ,
187- } ) ,
188- ] ) ;
189-
190- assert . strictEqual ( executed , false ) ;
191- assert . deepStrictEqual ( outcome , { prevented : false , context } ) ;
192- } ) ;
193-
194- it ( 'runs the handler of an app whose check opted in' , async ( ) => {
195- const outcome = await runPreCallCreated ( [
196- mockApp ( 'opting-in' , {
197- [ AppMethod . CHECK_PRE_MEDIA_CALL_CREATED ] : ( ) => true ,
198- [ AppMethod . EXECUTE_PRE_MEDIA_CALL_CREATED ] : ( ) => EventResult . prevent ( { reason : 'callee is on a do-not-disturb list' } ) ,
199- } ) ,
200- ] ) ;
201-
202- assert . deepStrictEqual ( outcome , {
203- prevented : true ,
204- appId : 'opting-in' ,
205- reason : 'callee is on a do-not-disturb list' ,
206- } ) ;
207- } ) ;
208-
209178 it ( 'drops a patch whose features are not a list' , async ( ) => {
210179 const { result : outcome , warnings } = await capturingWarnings ( ( ) =>
211180 runPreCallCreated ( [
@@ -260,27 +229,6 @@ describe('AppListenerManager media call events', () => {
260229 / a p p b l e w u p / ,
261230 ) ;
262231 } ) ;
263-
264- it ( 'fails closed when an app check throws' , async ( ) => {
265- let executed = false ;
266-
267- await assert . rejects (
268- runPreCallCreated ( [
269- mockApp ( 'failing' , {
270- [ AppMethod . CHECK_PRE_MEDIA_CALL_CREATED ] : ( ) => {
271- throw new Error ( 'check blew up' ) ;
272- } ,
273- [ AppMethod . EXECUTE_PRE_MEDIA_CALL_CREATED ] : ( ) => {
274- executed = true ;
275- return EventResult . pass ( ) ;
276- } ,
277- } ) ,
278- ] ) ,
279- / c h e c k b l e w u p / ,
280- ) ;
281-
282- assert . strictEqual ( executed , false ) ;
283- } ) ;
284232 } ) ;
285233
286234 describe ( 'post media call events' , ( ) => {
0 commit comments