contextData.spec.jsx 571 B

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