@@ -81,7 +81,7 @@ suite('CodeAction', () => {
8181 setup ( function ( ) {
8282 disposables . clear ( ) ;
8383 model = TextModel . createFromString ( 'test1\ntest2\ntest3' , undefined , langId , uri ) ;
84- disposables . push ( model ) ;
84+ disposables . add ( model ) ;
8585 } ) ;
8686
8787 teardown ( function ( ) {
@@ -103,7 +103,7 @@ suite('CodeAction', () => {
103103 }
104104 } ;
105105
106- disposables . push ( CodeActionProviderRegistry . register ( 'fooLang' , provider ) ) ;
106+ disposables . add ( CodeActionProviderRegistry . register ( 'fooLang' , provider ) ) ;
107107
108108 const expected = [
109109 // CodeActions with a diagnostics array are shown first ordered by diagnostics.message
@@ -133,7 +133,7 @@ suite('CodeAction', () => {
133133 }
134134 } ;
135135
136- disposables . push ( CodeActionProviderRegistry . register ( 'fooLang' , provider ) ) ;
136+ disposables . add ( CodeActionProviderRegistry . register ( 'fooLang' , provider ) ) ;
137137
138138 {
139139 const { actions } = await getCodeActions ( model , new Range ( 1 , 1 , 2 , 1 ) , { type : 'auto' , filter : { kind : new CodeActionKind ( 'a' ) } } , CancellationToken . None ) ;
@@ -163,7 +163,7 @@ suite('CodeAction', () => {
163163 }
164164 } ;
165165
166- disposables . push ( CodeActionProviderRegistry . register ( 'fooLang' , provider ) ) ;
166+ disposables . add ( CodeActionProviderRegistry . register ( 'fooLang' , provider ) ) ;
167167
168168 const { actions } = await getCodeActions ( model , new Range ( 1 , 1 , 2 , 1 ) , { type : 'auto' , filter : { kind : new CodeActionKind ( 'a' ) } } , CancellationToken . None ) ;
169169 assert . equal ( actions . length , 1 ) ;
@@ -180,7 +180,7 @@ suite('CodeAction', () => {
180180 }
181181 } ;
182182
183- disposables . push ( CodeActionProviderRegistry . register ( 'fooLang' , provider ) ) ;
183+ disposables . add ( CodeActionProviderRegistry . register ( 'fooLang' , provider ) ) ;
184184
185185 {
186186 const { actions } = await getCodeActions ( model , new Range ( 1 , 1 , 2 , 1 ) , { type : 'auto' } , CancellationToken . None ) ;
@@ -206,7 +206,7 @@ suite('CodeAction', () => {
206206 providedCodeActionKinds = [ CodeActionKind . Refactor . value ] ;
207207 } ;
208208
209- disposables . push ( CodeActionProviderRegistry . register ( 'fooLang' , provider ) ) ;
209+ disposables . add ( CodeActionProviderRegistry . register ( 'fooLang' , provider ) ) ;
210210
211211 const { actions } = await getCodeActions ( model , new Range ( 1 , 1 , 2 , 1 ) , {
212212 type : 'auto' ,
0 commit comments