/* eslint-env jest */ import { bulkImproveCost, newCheckCost, rerunCost } from '../check-cost'; describe('catalog check prices', () => { it('prices a new check at the most it can sample', () => { expect(newCheckCost()).toBe('up to 50 credits'); }); it('prices a re-run by the products it scores again', () => { expect(rerunCost(12)).toBe('12 credits'); expect(rerunCost(0)).toBe('1 credit'); }); }); describe('bulk improve price', () => { it('bills every field for every product, as a ceiling over the audit', () => { expect(bulkImproveCost(40, 2, false)).toBe('up to 800 credits'); }); it('is exact for one product', () => { expect(bulkImproveCost(1, 3, true)).toBe('30 credits'); }); it('bills one field at least', () => { expect(bulkImproveCost(1, 0, true)).toBe('10 credits'); }); });