UNPKG

@t7/utils

Version:

Utility methods for T7 components.

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