import { validateDto } from '@fc/common' ; import { EidasCountries } from '@fc/eidas-country' ; import { EidasBridgeValidateEuropeanIdentity } from './eidas-bridge-validate-european-identity.dto' ; describe ( 'Eidas bridge countries DTO' , ( ) => { const validationOptions = { whitelist : true , forbidUnknownValues : true , forbidNonWhitelisted : true , } ; it ( 'should validate with good type and value' , async ( ) => { const data = { country : EidasCountries . BELGIUM } ; const result = await validateDto ( data , EidasBridgeValidateEuropeanIdentity , validationOptions ) ; expect ( result ) . toEqual ( [ ] ) ; } ) ; it ( 'should not validate with wrong type' , async ( ) => { const data = { lol : true } ; const result = await validateDto ( data , EidasBridgeValidateEuropeanIdentity , validationOptions ) ; expect ( result ) . not . toEqual ( [ ] ) ; } ) ; it ( 'should not validate with wrong value' , async ( ) => { const data = { country : 'US' } ; const result = await validateDto ( data , EidasBridgeValidateEuropeanIdentity , validationOptions ) ; expect ( result ) . not . toEqual ( [ ] ) ; } ) ; } ) ;