splitDiff.spec.tsx 653 B

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