{"size": 659, "ext": "js", "max_stars_repo_path": "spec/PollAnswerSpec.js", "max_stars_repo_name": "bohandley/react-tdd", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "spec/PollAnswerSpec.js", "max_issues_repo_name": "bohandley/react-tdd", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "spec/PollAnswerSpec.js", "max_forks_repo_name": "bohandley/react-tdd", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.652173913, "max_line_length": 80, "alphanum_fraction": 0.6479514416}
import React from 'react';
import TestUtils from 'react-dom/test-utils';
import PollAnswer from '../src/components/PollAnswer.js';

describe('PollAnswer', function(){
    var component;
    
    beforeEach(function(){
      component = TestUtils.renderIntoDocument(<PollAnswer text="Who knows?" />)
    });

    it('renders without problems', function(){
        expect(component).toEqual(jasmine.anything());
    });

    it('prints a message', function(){
      var actual = TestUtils
        .findRenderedDOMComponentWithTag(component, 'span')
        .textContent;
        var expected = "Who knows?";
        expect(actual).toEqual(expected);
    });
});