Enhancement: better detection of default currency code (#6020)

This commit is contained in:
shamoon
2024-03-07 07:04:32 -08:00
committed by GitHub
parent 700af8caa2
commit 1eff4b306f
2 changed files with 12 additions and 4 deletions

View File

@@ -56,4 +56,10 @@ describe('MonetaryComponent', () => {
component.monetaryValue = 10.5
expect(component.value).toEqual('EUR10.50')
})
it('should set the default currency code based on LOCALE_ID', () => {
expect(component.defaultCurrencyCode).toEqual('USD') // default
component = new MonetaryComponent('pt-BR')
expect(component.defaultCurrencyCode).toEqual('BRL')
})
})