contextData.spec.jsx 599 B

12345678910111213141516171819
  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(wrapper.find('span').at(0).text()).toEqual(URL);
  11. expect(wrapper.find('a').at(0).prop('href')).toEqual(URL);
  12. });
  13. });
  14. });
  15. });