splitDiff.spec.jsx 647 B

12345678910111213141516171819202122232425
  1. import React from 'react';
  2. import {shallow} from 'enzyme';
  3. import SplitDiff from 'app/components/splitDiff';
  4. describe('SplitDiff', function() {
  5. beforeEach(function() {});
  6. afterEach(function() {});
  7. it('renders', function() {
  8. const wrapper = shallow(<SplitDiff base="restaurant" target="aura" />);
  9. expect(wrapper).toMatchSnapshot();
  10. });
  11. it('renders with newlines', function() {
  12. const base = `this is my restaurant
  13. and restaurant
  14. common`;
  15. const target = `aura
  16. and your aura
  17. common`;
  18. const wrapper = shallow(<SplitDiff base={base} target={target} />);
  19. expect(wrapper).toMatchSnapshot();
  20. });
  21. });