UNPKG

calculate-items

Version:

Items calculation template

15 lines (14 loc) 502 B
import ItemsParser from "../../utils/ItemsParser"; import ItemsFormatter from "../../utils/ItemsFormatter"; describe('ItemsFormatter.test', () => { test('Summary total format', () => { const exp = '80 000 + (2+8)*2000/2 + 2*10000/2' expect(ItemsFormatter.formatSummary( ItemsParser.calculateResultFromExpression( exp ))) .toBe(`80 000 + (2+8)*2000/2 + 2*10000/2 ------------- Jami: <b>100 000.00</b> `); }); });