12345678910111213141516171819202122232425262728 |
- import React from 'react';
- import {shallow} from 'enzyme';
- import ContextData from 'app/components/contextData';
- describe('ContextData', function() {
- describe('render()', function() {
- describe('strings', function() {
- it('should render urls w/ an additional <a> link', function() {
- const URL = 'https://example.org/foo/bar/';
- let wrapper = shallow(<ContextData data={URL} />);
- expect(
- wrapper
- .find('span')
- .at(0)
- .text()
- ).toEqual(URL);
- expect(
- wrapper
- .find('a')
- .at(0)
- .prop('href')
- ).toEqual(URL);
- });
- });
- });
- });
|