@@ -80,7 +80,7 @@ describe('FunctionsSecretClient', () => {
8080
8181 expect ( result ) . toEqual ( {
8282 key : mockSecret . key ,
83- value : JSON . parse ( mockSecret . value ) ,
83+ value : mockSecret . value ,
8484 } ) ;
8585 expect ( mockFs . readFileSync ) . toHaveBeenCalledWith (
8686 expect . stringContaining ( 'functions/settings.json' ) ,
@@ -101,7 +101,7 @@ describe('FunctionsSecretClient', () => {
101101
102102 expect ( result ) . toEqual ( {
103103 key : mockSecret . key ,
104- value : JSON . parse ( mockSecret . value ) ,
104+ value : mockSecret . value ,
105105 } ) ;
106106 expect ( mockCache . has ) . not . toHaveBeenCalled ( ) ;
107107 expect ( mockFs . readFileSync ) . toHaveBeenCalled ( ) ;
@@ -149,8 +149,8 @@ describe('FunctionsSecretClient', () => {
149149 describe ( 'updateSecret' , ( ) => {
150150 const mockSettings = {
151151 secrets : [
152- { key : 'ExistingKey' , value : '" ExistingValue" ' } ,
153- { key : 'AnotherKey' , value : '" AnotherValue" ' } ,
152+ { key : 'ExistingKey' , value : 'ExistingValue' } ,
153+ { key : 'AnotherKey' , value : 'AnotherValue' } ,
154154 ] ,
155155 } ;
156156
@@ -169,7 +169,7 @@ describe('FunctionsSecretClient', () => {
169169 expect ( result ) . toEqual ( updatedSecret ) ;
170170 expect ( mockFs . writeFileSync ) . toHaveBeenCalledWith (
171171 expect . stringContaining ( 'functions/settings.json' ) ,
172- expect . stringContaining ( '"\\" NewValue\\"" ' ) ,
172+ expect . stringContaining ( 'NewValue' ) ,
173173 ) ;
174174 expect ( mockCache . set ) . toHaveBeenCalledWith ( 'ExistingKey' , {
175175 key : 'ExistingKey' ,
@@ -279,11 +279,11 @@ describe('FunctionsSecretClient', () => {
279279 expect ( writtenData . secrets ) . toHaveLength ( 2 ) ;
280280 expect ( writtenData . secrets [ 0 ] ) . toEqual ( {
281281 key : 'ExistingKey' ,
282- value : '" UpdatedValue" ' ,
282+ value : 'UpdatedValue' ,
283283 } ) ;
284284 expect ( writtenData . secrets [ 1 ] ) . toEqual ( {
285285 key : 'AnotherKey' ,
286- value : '" AnotherValue" ' ,
286+ value : 'AnotherValue' ,
287287 } ) ;
288288 } ) ;
289289
0 commit comments