@@ -16,6 +16,17 @@ import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyServ
1616import { SimpleConfigurationService } from 'vs/editor/standalone/browser/simpleServices' ;
1717import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey' ;
1818import Event , { Emitter } from 'vs/base/common/event' ;
19+ import { ILogService } from 'vs/platform/log/common/log' ;
20+
21+ class NoopLogService implements ILogService {
22+ _serviceBrand : any ;
23+ trace ( message : string , ...args : any [ ] ) : void { }
24+ debug ( message : string , ...args : any [ ] ) : void { }
25+ info ( message : string , ...args : any [ ] ) : void { }
26+ warn ( message : string , ...args : any [ ] ) : void { }
27+ error ( message : string | Error , ...args : any [ ] ) : void { }
28+ critical ( message : string | Error , ...args : any [ ] ) : void { }
29+ }
1930
2031class SimpleExtensionService implements IExtensionService {
2132 _serviceBrand : any ;
@@ -70,7 +81,7 @@ suite('CommandService', function () {
7081 lastEvent = activationEvent ;
7182 return super . activateByEvent ( activationEvent ) ;
7283 }
73- } , new ContextKeyService ( new SimpleConfigurationService ( ) ) ) ;
84+ } , new ContextKeyService ( new SimpleConfigurationService ( ) ) , new NoopLogService ( ) ) ;
7485
7586 return service . executeCommand ( 'foo' ) . then ( ( ) => {
7687 assert . ok ( lastEvent , 'onCommand:foo' ) ;
@@ -88,7 +99,7 @@ suite('CommandService', function () {
8899 activateByEvent ( activationEvent : string ) : TPromise < void > {
89100 return TPromise . wrapError < void > ( new Error ( 'bad_activate' ) ) ;
90101 }
91- } , new ContextKeyService ( new SimpleConfigurationService ( ) ) ) ;
102+ } , new ContextKeyService ( new SimpleConfigurationService ( ) ) , new NoopLogService ( ) ) ;
92103
93104 return service . executeCommand ( 'foo' ) . then ( ( ) => assert . ok ( false ) , err => {
94105 assert . equal ( err . message , 'bad_activate' ) ;
@@ -104,7 +115,7 @@ suite('CommandService', function () {
104115 whenInstalledExtensionsRegistered ( ) {
105116 return new TPromise < boolean > ( _resolve => { /*ignore*/ } ) ;
106117 }
107- } , new ContextKeyService ( new SimpleConfigurationService ( ) ) ) ;
118+ } , new ContextKeyService ( new SimpleConfigurationService ( ) ) , new NoopLogService ( ) ) ;
108119
109120 service . executeCommand ( 'bar' ) ;
110121 assert . equal ( callCounter , 1 ) ;
@@ -121,7 +132,7 @@ suite('CommandService', function () {
121132 whenInstalledExtensionsRegistered ( ) {
122133 return new TPromise < boolean > ( _resolve => { resolveFunc = _resolve ; } ) ;
123134 }
124- } , new ContextKeyService ( new SimpleConfigurationService ( ) ) ) ;
135+ } , new ContextKeyService ( new SimpleConfigurationService ( ) ) , new NoopLogService ( ) ) ;
125136
126137 let r = service . executeCommand ( 'bar' ) ;
127138 assert . equal ( callCounter , 0 ) ;
@@ -140,7 +151,8 @@ suite('CommandService', function () {
140151 let commandService = new CommandService (
141152 new InstantiationService ( ) ,
142153 new SimpleExtensionService ( ) ,
143- contextKeyService
154+ contextKeyService ,
155+ new NoopLogService ( )
144156 ) ;
145157
146158 let counter = 0 ;
0 commit comments