import { create } from 'react-test-renderer'; import Box from './Box'; test('Box renders', () => { const tree = create().toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct *-hide classes when display is false', () => { const tree = create( , ).toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct classes when display is flex', () => { const tree = create().toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct *-flex-column classes when display is flexColumn', () => { const tree = create( , ).toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct *-inline-block classes when display is inlineBlock', () => { const tree = create( , ).toJSON(); expect(tree).toMatchSnapshot(); }); test('Box allows zero values for whitespace', () => { const tree = create().toJSON(); expect(tree).toMatchSnapshot(); }); test('Box dangerouslySetInlineStyle', () => { expect( create().toJSON(), ).toMatchSnapshot(); }); test('Box correctly sets visually hidden', () => { expect(create()).toMatchSnapshot(); }); test('Box has correct marginStart and marginEnd when marginStart equals 1 and marginEnd equals 2', () => { expect(create()).toMatchSnapshot(); }); test('Box has correct marginStart and marginEnd when marginStart and marginEnd are negative', () => { expect(create()).toMatchSnapshot(); }); test('Box allows auto margin', () => { expect(create()).toMatchSnapshot(); }); test('Box has correct class when opacity is 0.5', () => { const tree = create().toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct class when opacity is 1', () => { const tree = create().toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct class when rounding is 1', () => { const tree = create().toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct class when rounding is circle', () => { const tree = create().toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct classes when borderStyle is lg', () => { const tree = create().toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct classes when borderStyle is shadow', () => { const tree = create().toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct classes when borderStyle is raisedTopShadow', () => { const tree = create().toJSON(); expect(tree).toMatchSnapshot(); }); test('Box has correct zIndex', () => { const zIndexStub = { index() { return 100; }, } as const; const tree = create().toJSON(); expect(tree).toMatchSnapshot(); });