From 3aaf98c6ffe90854a52005ae0830733b29497d9e Mon Sep 17 00:00:00 2001 From: Phillip Hartin Date: Wed, 17 Jan 2024 16:00:33 +1100 Subject: [PATCH] Fix tests --- .github/workflows/ci.yml | 2 +- test/formatters.test.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d28efa7..391d9596 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,4 +37,4 @@ jobs: - id: test name: Run test run: | - bun test + bun run test diff --git a/test/formatters.test.ts b/test/formatters.test.ts index d916998f..88b22d1e 100644 --- a/test/formatters.test.ts +++ b/test/formatters.test.ts @@ -6,11 +6,11 @@ import { formatCurrency, formatDuration, formatList } from '../src/formatters' test('formatCurrency', () => { expect(formatCurrency(1000.95)).toBe('$1,000.95') - expect(formatCurrency(1000.95, 'EUR')).toBe('€1,000.95') - expect(formatCurrency(1000, 'JPY')).toBe('¥1,000') - expect(formatCurrency(1000.95, 'GBP')).toBe('£1,000.95') - expect(formatCurrency(1000.95, 'CAD')).toBe('CA$1,000.95') - expect(formatCurrency(1000.95, 'AUD')).toBe('A$1,000.95') + expect(formatCurrency(1000.95, 2, 'EUR')).toBe('€1,000.95') + expect(formatCurrency(1000, 0, 'JPY')).toBe('¥1,000') + expect(formatCurrency(1000.95, 2, 'GBP')).toBe('£1,000.95') + expect(formatCurrency(1000.95, 2, 'CAD')).toBe('CA$1,000.95') + expect(formatCurrency(1000.95, 2, 'AUD')).toBe('A$1,000.95') }) test('formatDuration', () => {