add test of pxToRem

This commit is contained in:
matsubara 2021-12-10 23:04:59 +09:00
parent f80b89fe69
commit 77fc12b75c

View File

@ -0,0 +1,17 @@
import pxToRem from '../../pxToRem';
describe('HELPER_PLUGIN | utils | pxToRem', () => {
it('should return 2rem if data is 32', () => {
const data = 32;
const expected = '2rem';
expect(pxToRem(data)).toEqual(expected);
});
it('should return 1rem if data is 16', () => {
const data = 16;
const expected = '1rem';
expect(pxToRem(data)).toEqual(expected);
});
});