@@ -241,48 +241,4 @@ describe('MockSuite', () => {
241241 expect ( actualError . status ) . toStrictEqual ( 429 ) ;
242242 expect ( endTime - startTime ) . toStrictEqual ( 10 ) ;
243243 } ) ;
244-
245- test ( 'SendDebugHeader' , ( ) => {
246- let expectedBotId :string ;
247- const actual = 'botid' ;
248- services . ajax = DirectLineMock . mockAjax ( server , ( urlOrRequest ) => {
249- if ( typeof urlOrRequest === 'string' ) {
250- throw new Error ( ) ;
251- }
252-
253- if ( urlOrRequest . url && urlOrRequest . url . indexOf ( server . conversation . conversationId ) > 0 ) {
254- const response : Partial < AjaxResponse > = {
255- response : { id :'blah' } ,
256- status : 200
257- } ;
258- expectedBotId = urlOrRequest . headers [ 'x-ms-bot-id' ] ;
259- return response as AjaxResponse ;
260- }
261- else if ( urlOrRequest . url && urlOrRequest . url . indexOf ( '/conversations' ) > 0 ) {
262- // start conversation
263- const response : Partial < AjaxResponse > = {
264- response : server . conversation ,
265- status : 201 ,
266- xhr : {
267- getResponseHeader : ( name ) => actual
268- } as XMLHttpRequest
269- } ;
270- return response as AjaxResponse ;
271- }
272- throw new Error ( ) ;
273- } ) ;
274- directline = new DirectLineExport . DirectLine ( services ) ;
275- const scenario = function * ( ) : IterableIterator < Observable < unknown > > {
276- yield Observable . timer ( 200 , scheduler ) ;
277- yield directline . postActivity ( expected . x ) . catch ( ( ) => Observable . empty ( scheduler ) ) ;
278- } ;
279-
280- // lack of subscribe arguments means that the empty subscriber is used
281- // the empty subscriber will propagate observable errors on the JS call stack
282- // within the scheduler notification action handling loop because of the observeOn
283- subscriptions . push ( lazyConcat ( scenario ( ) ) . observeOn ( scheduler ) . subscribe ( ) ) ;
284- scheduler . flush ( ) ;
285-
286- expect ( expectedBotId ) . toBe ( actual ) ;
287- } ) ;
288244} ) ;
0 commit comments