splitDiff.spec.jsx 677 B

123456789101112131415161718192021222324252627
  1. import React from 'react';
  2. import {mountWithTheme} from 'sentry-test/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 = mountWithTheme(<SplitDiff base="restaurant" target="aura" />);
  9. expect(wrapper).toSnapshot();
  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 = mountWithTheme(<SplitDiff base={base} target={target} />);
  19. expect(wrapper).toSnapshot();
  20. });
  21. });