From 61c86e7ddd1c44f4d2393a61c1afd68d02199e3b Mon Sep 17 00:00:00 2001 From: Sampo Tawast Date: Wed, 20 Nov 2024 10:28:34 +0200 Subject: [PATCH] refactor: use default "EUR" instead of explicit argument --- .../benefit/applicant/browser-tests/utils/fieldMaps.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/benefit/applicant/browser-tests/utils/fieldMaps.ts b/frontend/benefit/applicant/browser-tests/utils/fieldMaps.ts index b23ed6a8f9..1e8a08eebf 100644 --- a/frontend/benefit/applicant/browser-tests/utils/fieldMaps.ts +++ b/frontend/benefit/applicant/browser-tests/utils/fieldMaps.ts @@ -9,13 +9,13 @@ export type ApplicationField = { const formatFloatToCurrency = ( value: string | number, - currency: 'EUR' | null, + currency: 'EUR' | null = 'EUR', locale = 'fi-FI' ): string => { const parsedValue = typeof value === 'string' ? parseFloat(value) : value; const currencyOptions = currency ? { - style: 'currency', + style: 'currency' as const, currency, } : {}; @@ -72,15 +72,15 @@ export const mapRequiredForm = ( }, { testId: 'application-field-monthlyPay', - value: formatFloatToCurrency(form.employee.monthlyPay, 'EUR'), + value: formatFloatToCurrency(form.employee.monthlyPay), }, { testId: 'application-field-vacationMoney', - value: formatFloatToCurrency(form.employee.vacationMoney, 'EUR'), + value: formatFloatToCurrency(form.employee.vacationMoney), }, { testId: 'application-field-otherExpenses', - value: formatFloatToCurrency(form.employee.otherExpenses, 'EUR'), + value: formatFloatToCurrency(form.employee.otherExpenses), }, { testId: 'application-field-paySubsidyGranted', value: 'Palkkatuki' }, { testId: 'application-field-apprenticeshipProgram', value: null },