@@ -236,9 +236,8 @@ describe('PluginHost', () => {
236236 )
237237 ] ;
238238
239- const { docManager, pluginHost } = setup ( {
240- getDocumentSymbols : sinon . stub ( ) . returns ( flat_symbols )
241- } ) ;
239+ const { docManager, pluginHost } = setup ( { } ) ;
240+ sinon . stub ( pluginHost , 'getDocumentSymbols' ) . returns ( Promise . resolve ( flat_symbols ) ) ;
242241 docManager . openClientDocument ( textDocument ) ;
243242
244243 const result = await pluginHost . getHierarchicalDocumentSymbols (
@@ -281,9 +280,8 @@ describe('PluginHost', () => {
281280 onCancellationRequested : ( ) => ( { dispose : ( ) => { } } )
282281 } ;
283282
284- const { docManager, pluginHost } = setup ( {
285- getDocumentSymbols : sinon . stub ( ) . returns ( [ ] )
286- } ) ;
283+ const { docManager, pluginHost } = setup ( { } ) ;
284+ sinon . stub ( pluginHost , 'getDocumentSymbols' ) . returns ( Promise . resolve ( [ ] ) ) ;
287285 docManager . openClientDocument ( textDocument ) ;
288286
289287 const result = await pluginHost . getHierarchicalDocumentSymbols (
@@ -316,9 +314,8 @@ describe('PluginHost', () => {
316314 )
317315 ] ;
318316
319- const { docManager, pluginHost } = setup ( {
320- getDocumentSymbols : sinon . stub ( ) . returns ( flat_symbols )
321- } ) ;
317+ const { docManager, pluginHost } = setup ( { } ) ;
318+ sinon . stub ( pluginHost , 'getDocumentSymbols' ) . returns ( Promise . resolve ( flat_symbols ) ) ;
322319 docManager . openClientDocument ( textDocument ) ;
323320
324321 const result = await pluginHost . getHierarchicalDocumentSymbols (
0 commit comments