contextData.spec.jsx 713 B

1234567891011121314151617181920212223242526272829
  1. import React from 'react';
  2. import {mountWithTheme} from 'sentry-test/enzyme';
  3. import ContextData from 'app/components/contextData';
  4. describe('ContextData', function() {
  5. describe('render()', function() {
  6. describe('strings', function() {
  7. it('should render urls w/ an additional <a> link', function() {
  8. const URL = 'https://example.org/foo/bar/';
  9. const wrapper = mountWithTheme(<ContextData data={URL} />);
  10. expect(
  11. wrapper
  12. .find('span')
  13. .at(0)
  14. .text()
  15. ).toEqual(URL);
  16. expect(
  17. wrapper
  18. .find('a')
  19. .at(0)
  20. .prop('href')
  21. ).toEqual(URL);
  22. });
  23. });
  24. });
  25. });