@@ -57,7 +57,7 @@ describe('EditDecorationManager', function () {
5757 sandbox . restore ( )
5858 } )
5959
60- it ( 'should display SVG decorations in the editor' , function ( ) {
60+ it ( 'should display SVG decorations in the editor' , async function ( ) {
6161 // Create a fake SVG image URI
6262 const svgUri = vscode . Uri . parse ( 'file:///path/to/image.svg' )
6363
@@ -69,7 +69,7 @@ describe('EditDecorationManager', function () {
6969 editorStub . setDecorations . reset ( )
7070
7171 // Call displayEditSuggestion
72- manager . displayEditSuggestion (
72+ await manager . displayEditSuggestion (
7373 editorStub as unknown as vscode . TextEditor ,
7474 svgUri ,
7575 0 ,
@@ -94,7 +94,7 @@ describe('EditDecorationManager', function () {
9494 } )
9595
9696 // Helper function to setup edit suggestion test
97- function setupEditSuggestionTest ( ) {
97+ async function setupEditSuggestionTest ( ) {
9898 // Create a fake SVG image URI
9999 const svgUri = vscode . Uri . parse ( 'file:///path/to/image.svg' )
100100
@@ -103,7 +103,7 @@ describe('EditDecorationManager', function () {
103103 const rejectHandler = sandbox . stub ( )
104104
105105 // Display the edit suggestion
106- manager . displayEditSuggestion (
106+ await manager . displayEditSuggestion (
107107 editorStub as unknown as vscode . TextEditor ,
108108 svgUri ,
109109 0 ,
@@ -117,8 +117,8 @@ describe('EditDecorationManager', function () {
117117 return { acceptHandler, rejectHandler }
118118 }
119119
120- it ( 'should trigger accept handler when command is executed' , function ( ) {
121- const { acceptHandler, rejectHandler } = setupEditSuggestionTest ( )
120+ it ( 'should trigger accept handler when command is executed' , async function ( ) {
121+ const { acceptHandler, rejectHandler } = await setupEditSuggestionTest ( )
122122
123123 // Find the command handler that was registered for accept
124124 const acceptCommandArgs = commandsStub . registerCommand . args . find (
@@ -138,8 +138,8 @@ describe('EditDecorationManager', function () {
138138 }
139139 } )
140140
141- it ( 'should trigger reject handler when command is executed' , function ( ) {
142- const { acceptHandler, rejectHandler } = setupEditSuggestionTest ( )
141+ it ( 'should trigger reject handler when command is executed' , async function ( ) {
142+ const { acceptHandler, rejectHandler } = await setupEditSuggestionTest ( )
143143
144144 // Find the command handler that was registered for reject
145145 const rejectCommandArgs = commandsStub . registerCommand . args . find (
@@ -159,12 +159,12 @@ describe('EditDecorationManager', function () {
159159 }
160160 } )
161161
162- it ( 'should clear decorations when requested' , function ( ) {
162+ it ( 'should clear decorations when requested' , async function ( ) {
163163 // Reset the setDecorations stub to clear any previous calls
164164 editorStub . setDecorations . reset ( )
165165
166166 // Call clearDecorations
167- manager . clearDecorations ( editorStub as unknown as vscode . TextEditor )
167+ await manager . clearDecorations ( editorStub as unknown as vscode . TextEditor )
168168
169169 // Verify decorations were cleared
170170 assert . strictEqual ( editorStub . setDecorations . callCount , 2 )
0 commit comments