UNPKG

@t7/utils

Version:

Utility methods for T7 components.

27 lines (21 loc) 629 B
// Dependencies. import { formatMoneyKR } from './' // Describe test. describe('formatMoneyKR', () => { // =========================== // Test for "existing" values. // =========================== it('handles "existing" values', () => { expect(formatMoneyKR(1000).replace(/\s+/g, '')) .toBe('₩1,000') }) // ======================================= // Test for `null` and `undefined` values. // ======================================= it('handles `null` and `undefined` values', () => { expect(formatMoneyKR(null)) .toBe('') expect(formatMoneyKR(undefined)) .toBe('') }) })