@@ -131,35 +131,35 @@ describe("SecretStorageService", () => {
131131 const result = await service . getOAuthData ( "https://example.com/mcp" )
132132 expect ( result ) . toBeUndefined ( )
133133 } )
134+ } )
134135
135- describe ( "onDidChange" , ( ) => {
136- it ( "should call the callback when the key for the given URL changes" , ( ) => {
137- const cb = vi . fn ( )
138- service . onDidChange ( "https://example.com/mcp" , cb )
136+ describe ( "onDidChange" , ( ) => {
137+ it ( "should call the callback when the key for the given URL changes" , ( ) => {
138+ const cb = vi . fn ( )
139+ service . onDidChange ( "https://example.com/mcp" , cb )
139140
140- context . secrets . _emit ( "mcp.oauth.example.com.L21jcA.data" )
141+ context . secrets . _emit ( "mcp.oauth.example.com.L21jcA.data" )
141142
142- expect ( cb ) . toHaveBeenCalledTimes ( 1 )
143- } )
143+ expect ( cb ) . toHaveBeenCalledTimes ( 1 )
144+ } )
144145
145- it ( "should not call the callback for a different URL's key" , ( ) => {
146- const cb = vi . fn ( )
147- service . onDidChange ( "https://example.com/mcp" , cb )
146+ it ( "should not call the callback for a different URL's key" , ( ) => {
147+ const cb = vi . fn ( )
148+ service . onDidChange ( "https://example.com/mcp" , cb )
148149
149- context . secrets . _emit ( "mcp.oauth.other.com.L21jcA.data" )
150+ context . secrets . _emit ( "mcp.oauth.other.com.L21jcA.data" )
150151
151- expect ( cb ) . not . toHaveBeenCalled ( )
152- } )
152+ expect ( cb ) . not . toHaveBeenCalled ( )
153+ } )
153154
154- it ( "should stop calling the callback after the returned dispose function is called" , ( ) => {
155- const cb = vi . fn ( )
156- const unsubscribe = service . onDidChange ( "https://example.com/mcp" , cb )
155+ it ( "should stop calling the callback after the returned dispose function is called" , ( ) => {
156+ const cb = vi . fn ( )
157+ const unsubscribe = service . onDidChange ( "https://example.com/mcp" , cb )
157158
158- unsubscribe ( )
159- context . secrets . _emit ( "mcp.oauth.example.com.L21jcA.data" )
159+ unsubscribe ( )
160+ context . secrets . _emit ( "mcp.oauth.example.com.L21jcA.data" )
160161
161- expect ( cb ) . not . toHaveBeenCalled ( )
162- } )
162+ expect ( cb ) . not . toHaveBeenCalled ( )
163163 } )
164164 } )
165165
0 commit comments