<commit_before>import { parse } from 'react-docgen';

import Props from '../src/components/Props';

function render(propTypes) {
	let props = parse(`
		import { Component, PropTypes } from 'react';
		export default class Cmpnt extends Component {
			static propTypes = {
				${propTypes.join(',')}
			}
			render() {
			}
		}
	`);
	return <Props props={props}/>;
}

describe('Props', () => {

	it('should render PropTypes.string', () => {
		let result = render(['color: PropTypes.string']);
		expectReactShallow(result).to.contain(
			<tr>
				<td><code>color</code></td>
				<td><code>string</code></td>
				<td><span>Optional</span></td>
				<td><div/></td>
			</tr>
		);
	});<commit_msg>Fix component path in test (#32).<commit_after>import { parse } from 'react-docgen';

import Props from '../src/rsg-components/Props';

function render(propTypes) {
	let props = parse(`
		import { Component, PropTypes } from 'react';
		export default class Cmpnt extends Component {
			static propTypes = {
				${propTypes.join(',')}
			}
			render() {
			}
		}
	`);
	return <Props props={props}/>;
}

describe('Props', () => {

	it('should render PropTypes.string', () => {
		let result = render(['color: PropTypes.string']);
		expectReactShallow(result).to.contain(
			<tr>
				<td><code>color</code></td>
				<td><code>string</code></td>
				<td><span>Optional</span></td>
				<td><div/></td>
			</tr>
		);
	});
{'fraction_non_alphanumeric': 0.202991452991453, 'fraction_numerical': 0.0014245014245014246, 'mean_word_length': 3.5915032679738563, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6319002', 'n_tokens_mistral': 549, 'n_tokens_neox': 484, 'n_words': 97}