blob: 2cb3e6a0f5271b73f32a12b80c709413e6833fca [file] [log] [blame]
import { assert } from 'chai';
import { formatPercentage } from './anomaly';
describe('formatPercentage', () => {
it('returns percentage with a positive sign', () => {
const formattedPerc = formatPercentage(72);
assert.equal(formattedPerc, `+72`);
});
it('returns percentage with a negative sign', () => {
const formattedPerc = formatPercentage(-72);
assert.equal(formattedPerc, `-72`);
});
});