"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var formatCurrency_1 = require("../../../src/core/utils/formatCurrency");
describe('UNIT: formatCurrency', function () {
    it('Empty', function () {
        chai_1.expect(formatCurrency_1.formatCurrency('')).to.eq('$0.00');
    });
    it('Zero', function () {
        chai_1.expect(formatCurrency_1.formatCurrency('0')).to.eq('$0.00');
    });
    it('Always round down', function () {
        chai_1.expect(formatCurrency_1.formatCurrency('123.409')).to.eq('$123.40');
        chai_1.expect(formatCurrency_1.formatCurrency('123.405')).to.eq('$123.40');
        chai_1.expect(formatCurrency_1.formatCurrency('123.404')).to.eq('$123.40');
        chai_1.expect(formatCurrency_1.formatCurrency('123.401')).to.eq('$123.40');
    });
    it('Without currency symbol', function () {
        chai_1.expect(formatCurrency_1.formatCurrency('123.4567', '')).to.eq('123.45');
    });
});
describe('UNIT: getTildeGivenAmount', function () {
    it('Empty', function () {
        chai_1.expect(formatCurrency_1.getTildeGivenAmount('')).to.eq('');
    });
    it('Zero', function () {
        chai_1.expect(formatCurrency_1.getTildeGivenAmount('0')).to.eq('');
    });
    it('Return tide', function () {
        chai_1.expect(formatCurrency_1.getTildeGivenAmount('123.409')).to.eq('~');
        chai_1.expect(formatCurrency_1.getTildeGivenAmount('5555')).to.eq('~');
        chai_1.expect(formatCurrency_1.getTildeGivenAmount('12.33')).to.eq('~');
    });
});
//# sourceMappingURL=formatCurrency.test.js.map