@@ -57,7 +57,7 @@ describe('EditDecorationManager', function () {
57
57
sandbox . restore ( )
58
58
} )
59
59
60
- it ( 'should display SVG decorations in the editor' , function ( ) {
60
+ it ( 'should display SVG decorations in the editor' , async function ( ) {
61
61
// Create a fake SVG image URI
62
62
const svgUri = vscode . Uri . parse ( 'file:///path/to/image.svg' )
63
63
@@ -69,7 +69,7 @@ describe('EditDecorationManager', function () {
69
69
editorStub . setDecorations . reset ( )
70
70
71
71
// Call displayEditSuggestion
72
- manager . displayEditSuggestion (
72
+ await manager . displayEditSuggestion (
73
73
editorStub as unknown as vscode . TextEditor ,
74
74
svgUri ,
75
75
0 ,
@@ -94,7 +94,7 @@ describe('EditDecorationManager', function () {
94
94
} )
95
95
96
96
// Helper function to setup edit suggestion test
97
- function setupEditSuggestionTest ( ) {
97
+ async function setupEditSuggestionTest ( ) {
98
98
// Create a fake SVG image URI
99
99
const svgUri = vscode . Uri . parse ( 'file:///path/to/image.svg' )
100
100
@@ -103,7 +103,7 @@ describe('EditDecorationManager', function () {
103
103
const rejectHandler = sandbox . stub ( )
104
104
105
105
// Display the edit suggestion
106
- manager . displayEditSuggestion (
106
+ await manager . displayEditSuggestion (
107
107
editorStub as unknown as vscode . TextEditor ,
108
108
svgUri ,
109
109
0 ,
@@ -117,8 +117,8 @@ describe('EditDecorationManager', function () {
117
117
return { acceptHandler, rejectHandler }
118
118
}
119
119
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 ( )
122
122
123
123
// Find the command handler that was registered for accept
124
124
const acceptCommandArgs = commandsStub . registerCommand . args . find (
@@ -138,8 +138,8 @@ describe('EditDecorationManager', function () {
138
138
}
139
139
} )
140
140
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 ( )
143
143
144
144
// Find the command handler that was registered for reject
145
145
const rejectCommandArgs = commandsStub . registerCommand . args . find (
@@ -159,12 +159,12 @@ describe('EditDecorationManager', function () {
159
159
}
160
160
} )
161
161
162
- it ( 'should clear decorations when requested' , function ( ) {
162
+ it ( 'should clear decorations when requested' , async function ( ) {
163
163
// Reset the setDecorations stub to clear any previous calls
164
164
editorStub . setDecorations . reset ( )
165
165
166
166
// Call clearDecorations
167
- manager . clearDecorations ( editorStub as unknown as vscode . TextEditor )
167
+ await manager . clearDecorations ( editorStub as unknown as vscode . TextEditor )
168
168
169
169
// Verify decorations were cleared
170
170
assert . strictEqual ( editorStub . setDecorations . callCount , 2 )
0 commit comments