File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ class Plugin {
149
149
await mod . main ( this . #denops) ;
150
150
await emit ( this . #denops, `DenopsSystemPluginPost:${ this . name } ` ) ;
151
151
} catch ( e ) {
152
- console . error ( `Failed to load plguin '${ this . name } ': ${ e } ` ) ;
152
+ console . error ( `Failed to load plugin '${ this . name } ': ${ e } ` ) ;
153
153
await emit ( this . #denops, `DenopsSystemPluginFail:${ this . name } ` ) ;
154
154
}
155
155
}
Original file line number Diff line number Diff line change @@ -112,9 +112,16 @@ Deno.test("Service", async (t) => {
112
112
await t . step (
113
113
"load() loads plugin and emits autocmd events (failure)" ,
114
114
async ( ) => {
115
+ const c = stub ( console , "error" ) ;
115
116
const s = stub ( host , "call" ) ;
116
117
try {
117
118
await service . load ( "dummyFail" , scriptInvalid ) ;
119
+ assertSpyCalls ( c , 1 ) ;
120
+ assertSpyCall ( c , 0 , {
121
+ args : [
122
+ "Failed to load plugin 'dummyFail': Error: This is dummy error" ,
123
+ ] ,
124
+ } ) ;
118
125
assertSpyCalls ( s , 2 ) ;
119
126
assertSpyCall ( s , 0 , {
120
127
args : [
@@ -132,6 +139,7 @@ Deno.test("Service", async (t) => {
132
139
} ) ;
133
140
} finally {
134
141
s . restore ( ) ;
142
+ c . restore ( ) ;
135
143
}
136
144
} ,
137
145
) ;
You can’t perform that action at this time.
0 commit comments