import { isQualifiedUserClients } from './TypePredicateUtil' ; describe ( 'TypePredicatUtil' , ( ) => { describe ( 'isQualifiedUserClients' , ( ) => { it ( 'detects QualifiedUserClients' , ( ) => { const validUserClients = [ { domain1 : { user1 : [ 'client1' ] } } , { domain1 : { user1 : [ ] } } , ] ; validUserClients . forEach ( payload => expect ( isQualifiedUserClients ( payload ) ) . toBeTrue ( ) ) ; } ) ; it ( 'rejects non QualifiedUserClients' , ( ) => { const invalidUserClients = [ { domain1 : { user1 : '' } } , { domain1 : { user1 : { } } } , { domain1 : [ ] } , { domain1 : { user1 : [ { } ] } } , ] ; invalidUserClients . forEach ( payload => expect ( isQualifiedUserClients ( payload ) ) . toBeFalse ( ) ) ; } ) ; } ) ; } ) ;