File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -433,5 +433,18 @@ describe("load", function () {
433433 expect ( settings ) . not . undefined ;
434434 expect ( settings ) . not . undefined ;
435435 expect ( settings . get ( "TestKey" ) ) . eq ( "TestValue" ) ;
436+ restoreMocks ( ) ;
437+ } ) ;
438+
439+ it ( "should throw error when snapshot composition type is not key" , async ( ) => {
440+ const snapshotName = "Test" ;
441+ mockAppConfigurationClientGetSnapshot ( snapshotName , { compositionType : "key_label" } ) ;
442+ const connectionString = createMockedConnectionString ( ) ;
443+ expect ( load ( connectionString , {
444+ selectors : [ {
445+ snapshotName : snapshotName
446+ } ]
447+ } ) ) . eventually . rejectedWith ( `Composition type for the selected snapshot with name ${ snapshotName } must be 'key'.` ) ;
448+ restoreMocks ( ) ;
436449 } ) ;
437450} ) ;
You can’t perform that action at this time.
0 commit comments