mirror of
https://github.com/archtechx/money.git
synced 2025-12-12 11:24:03 +00:00
fix test name
This commit is contained in:
parent
4a00c40ed8
commit
6c5f1feec4
1 changed files with 3 additions and 1 deletions
|
|
@ -47,11 +47,13 @@ test('the format method accepts overrides', function () {
|
|||
expect(Money::fromDecimal(10.45)->formatted(decimalSeparator: ',', suffix: ' USD'))->toBe('$10,45 USD');
|
||||
});
|
||||
|
||||
test('the trailing decimal zeros trimming', function () {
|
||||
test('decimal zeros can be trimmed', function () {
|
||||
// SEK uses decimal zero trimming
|
||||
expect(Money::fromDecimal(10.00, SEK::class)->formatted())->toBe('10 kr');
|
||||
expect(Money::fromDecimal(10.10, SEK::class)->formatted())->toBe('10.1 kr');
|
||||
expect(Money::fromDecimal(10.12, SEK::class)->formatted())->toBe('10.12 kr');
|
||||
|
||||
// EUR does not use decimal zero trimming
|
||||
expect(Money::fromDecimal(10.00, EUR::class)->formatted())->toBe('10.00 €');
|
||||
expect(Money::fromDecimal(10.10, EUR::class)->formatted())->toBe('10.10 €');
|
||||
expect(Money::fromDecimal(10.12, EUR::class)->formatted())->toBe('10.12 €');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue