UNPKG

651 BPlain TextView Raw
1import * as csx from '../src/margin';
2import * as assert from 'assert';
3
4describe('margin()', () => {
5 it('handles all sides', () => {
6 const value = csx.margin(1);
7 assert.equal(value, '1px');
8 });
9 it('handles topbottom rightleft', () => {
10 const value = csx.margin(1, 2);
11 assert.equal(value, '1px 2px');
12 });
13 it('handles top rightleft bottom', () => {
14 const value = csx.margin(1, 2, '3%');
15 assert.equal(value, '1px 2px 3%');
16 });
17 it('handles top right left bottom', () => {
18 const value = csx.margin(1, 2, 3, 4);
19 assert.equal(value, '1px 2px 3px 4px');
20 });
21});