spreadLayout.spec.jsx 643 B

123456789101112131415161718192021222324252627
  1. import React from 'react';
  2. import {shallow} from 'enzyme';
  3. import toJson from 'enzyme-to-json';
  4. import SpreadLayout from 'app/components/spreadLayout';
  5. describe('SpreadLayout', function() {
  6. it('renders with one child', function() {
  7. let component = shallow(
  8. <SpreadLayout>
  9. <div>child</div>
  10. </SpreadLayout>
  11. );
  12. expect(toJson(component)).toMatchSnapshot();
  13. });
  14. it('renders with multiple children', function() {
  15. let component = shallow(
  16. <SpreadLayout>
  17. <div>child #1</div>
  18. <div>child #2</div>
  19. </SpreadLayout>
  20. );
  21. expect(toJson(component)).toMatchSnapshot();
  22. });
  23. });