contextData.spec.tsx 562 B

1234567891011121314151617
  1. import {render, screen} from 'sentry-test/reactTestingLibrary';
  2. import ContextData from 'sentry/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. render(<ContextData data={URL} />);
  9. expect(screen.getByText(URL)).toBeInTheDocument();
  10. expect(screen.getByRole('link')).toHaveAttribute('href', URL);
  11. });
  12. });
  13. });
  14. });