11import { expect } from 'chai' ;
22import 'mocha' ;
3- import { EnvironmentVariableCollection , EnvironmentVariableMutator , ExtensionContext , ExtensionMode , Memento , Uri , window } from 'vscode' ;
3+ import { EnvironmentVariableCollection , EnvironmentVariableMutator , Event , ExtensionContext , ExtensionMode , Memento , SecretStorage , SecretStorageChangeEvent , Uri , window } from 'vscode' ;
44import * as yaml from 'js-yaml' ;
55import * as tmp from 'tmp' ;
66import * as path from 'path' ;
@@ -149,7 +149,7 @@ describe('helpers', () => {
149149 extensionMode : ExtensionMode = 3 ;
150150 subscriptions : { dispose ( ) : unknown } [ ] = [ ] ;
151151 workspaceState : Memento = new MockMemento ( ) ;
152- globalState : Memento = new MockMemento ( ) ;
152+ globalState = new MockGlobalStorage ( ) ;
153153 extensionPath = '' ;
154154 asAbsolutePath ( _relativePath : string ) : string {
155155 throw new Error ( 'Method not implemented.' ) ;
@@ -159,6 +159,11 @@ describe('helpers', () => {
159159 logPath = '' ;
160160 extensionUri = Uri . parse ( '' ) ;
161161 environmentVariableCollection = new MockEnvironmentVariableCollection ( ) ;
162+ secrets = new MockSecretStorage ( ) ;
163+ storageUri = Uri . parse ( '' ) ;
164+ globalStorageUri = Uri . parse ( '' ) ;
165+ logUri = Uri . parse ( '' ) ;
166+ extension : any ;
162167 }
163168
164169 class MockEnvironmentVariableCollection implements EnvironmentVariableCollection {
@@ -212,6 +217,25 @@ describe('helpers', () => {
212217 }
213218 }
214219
220+ class MockGlobalStorage extends MockMemento {
221+ public setKeysForSync ( _keys : string [ ] ) : void {
222+ return ;
223+ }
224+ }
225+
226+ class MockSecretStorage implements SecretStorage {
227+ get ( _key : string ) : Thenable < string | undefined > {
228+ throw new Error ( 'Method not implemented.' ) ;
229+ }
230+ store ( _key : string , _value : string ) : Thenable < void > {
231+ throw new Error ( 'Method not implemented.' ) ;
232+ }
233+ delete ( _key : string ) : Thenable < void > {
234+ throw new Error ( 'Method not implemented.' ) ;
235+ }
236+ onDidChange ! : Event < SecretStorageChangeEvent > ;
237+ }
238+
215239 it ( 'should report stream progress' , ( ) => {
216240 const spy = sandbox . spy ( ) ;
217241 const mockReadable = {
0 commit comments