🐛 add env to useDb and apply prettier
tinyedge/deploy Deployed by TinyEdge

This commit is contained in:
2026-08-07 13:28:26 +02:00
parent 67727f96ab
commit cbe1b42f6e
54 changed files with 5492 additions and 2406 deletions
+11 -11
View File
@@ -1,18 +1,18 @@
import { describe, expect, it } from 'vitest'
import { formatCurrency, fromCents, toCents } from './money'
import { describe, expect, it } from 'vitest';
import { formatCurrency, fromCents, toCents } from './money';
describe('money helpers', () => {
it('converts amounts to cents', () => {
expect(toCents(12.34)).toBe(1234)
expect(toCents(5)).toBe(500)
})
expect(toCents(12.34)).toBe(1234);
expect(toCents(5)).toBe(500);
});
it('converts cents back to amounts', () => {
expect(fromCents(1234)).toBe(12.34)
})
expect(fromCents(1234)).toBe(12.34);
});
it('formats cents as a localized currency string', () => {
expect(formatCurrency(1234, 'EUR')).toContain('12')
expect(formatCurrency(1234, 'EUR')).toContain('34')
})
})
expect(formatCurrency(1234, 'EUR')).toContain('12');
expect(formatCurrency(1234, 'EUR')).toContain('34');
});
});