1 import percentOf from './percentOf';
3 describe('percentOf()', () => {
4 it('returns the value of a percentage of another value', () => {
5 const output = percentOf(10, 200);
7 expect(output).toBe(20);
10 it("returns a decimal in case the percentage can't be resolved in integers", () => {
11 const output = percentOf(2.5, 10);
13 expect(Math.round(output)).not.toBe(output);