@@ -41,6 +41,24 @@ const mockedKVs = [{
4141 tags : { } ,
4242 etag : 'GdmsLWq3mFjFodVEXUYRmvFr3l_qRiKAW_KdpFbxZKk' ,
4343 isReadOnly : false
44+ } , {
45+ value : null ,
46+ key : 'KeyForNullValue' ,
47+ label : '' ,
48+ contentType : '' ,
49+ lastModified : '2023-05-04T04:32:56.000Z' ,
50+ tags : { } ,
51+ etag : 'GdmsLWq3mFjFodVEXUYRmvFr3l_qRiKAW_KdpFbxZKk' ,
52+ isReadOnly : false
53+ } , {
54+ value : "" ,
55+ key : 'KeyForEmptyValue' ,
56+ label : '' ,
57+ contentType : '' ,
58+ lastModified : '2023-05-04T04:32:56.000Z' ,
59+ tags : { } ,
60+ etag : 'GdmsLWq3mFjFodVEXUYRmvFr3l_qRiKAW_KdpFbxZKk' ,
61+ isReadOnly : false
4462} ] ;
4563
4664describe ( "load" , function ( ) {
@@ -121,4 +139,14 @@ describe("load", function () {
121139 expect ( settings . has ( "Key" ) ) . eq ( true ) ;
122140 expect ( settings . get ( "Key" ) ) . eq ( "TestValue" ) ;
123141 } ) ;
142+
143+ it ( "should support null/empty value" , async ( ) => {
144+ const connectionString = createMockedConnectionString ( ) ;
145+ const settings = await load ( connectionString ) ;
146+ expect ( settings ) . not . undefined ;
147+ expect ( settings . has ( "KeyForNullValue" ) ) . eq ( true ) ;
148+ expect ( settings . get ( "KeyForNullValue" ) ) . eq ( null ) ;
149+ expect ( settings . has ( "KeyForEmptyValue" ) ) . eq ( true ) ;
150+ expect ( settings . get ( "KeyForEmptyValue" ) ) . eq ( "" ) ;
151+ } ) ;
124152} )
0 commit comments