<commit_before>import renderToString from './../../server/renderToString';
import Component from './../../component/es2015';
import { render } from './../../DOM/rendering';
import {
	createContainerWithHTML,
	validateNodeTree
} from '../../tools/utils';
import {
	createStaticVElement,
	createOptBlueprint,
	createVComponent,
	createOptVElement
} from './../../core/shapes';
import {
	ChildrenTypes,
	ValueTypes,
	NodeTypes
} from './../../core/constants';

const Inferno = {
	createOptVElement,
	createStaticVElement,
	createOptBlueprint,
	createVComponent,
	ChildrenTypes,
	ValueTypes,
	NodeTypes
};

function Comp1() {
	return <span>Worked!</span>;
}

function Comp2() {
	return <em>Worked 2!</em>;
}

class Comp3 extends Component {
	render() {
		return <em>Works{ ' ' }<span>again</span>!</em>;
	}
}

function Comp4({ children }) {
	return <section>{children}</section>;
}

describe('SSR Hydration - (JSX)', () => {
	[
		{
			node: <div><span>Hello world</span></div>,
			expect1: '<div data-infernoroot=""><span>Hello world</span></div>',
			expect2: '<div><span>Hello world</span></div>'
		},
		{
			node: <div><p>Hello world<sup><a>Foo</a></sup></p></div>,
			expect1: '<div data-infernoroot=""><p>Hello world<sup><a>Foo</a></sup></p></div>',
			expect2: '<div><p>Hello world<sup><a>Foo</a></sup></p></div>'
		},
		{
			node: <div>{ <span>Hello world</span> }</div>,
			expect1: '<div data-infernoroot=""><span>Hello world</span></div>',
			expect2: '<div><span>Hello world</span></div>'
		},
		{
			node: <div><span>{ <span>Hello world</span> }</span></div>,
			expect1: '<div data-infernoroot=""><span><span>Hello world</span></span></div>',
			expect2: '<div><span><span>Hello world</span></span></div>'
		},
		{
			node: <div>Hello world</div>,
			expect1: '<div data-infernoroot="">Hello world</div>',
			expect2: '<div>Hello world</div>'
		},
		{
			node: <div><svg className={(() => 'foo')()} viewBox="0 0 64 64"></svg></div>,
			expect1: '<div data-infernoroot=""><svg class="foo" viewBox="0 0 64 64"}></svg></div>',
			expect2: '<div><svg class="foo" viewBox="0 0 64 64"}></svg></div>'
		},
		{
			node: <Comp4><h1>Hello world</h1><p><em>Foo</em></p><p>Woot</p><p><em>Bar</em></p></Comp4>,
			expect1: '<section data-infernoroot=""><h1>Hello world</h1><p><em>Foo</em></p><p>Woot</p><p><em>Bar</em></p></section>',
			expect2: '<section><h1>Hello world</h1><p><em>Foo</em></p><p>Woot</p><p><em>Bar</em></p></section>'
		},
		{
			node: <div>Hello world, { 'Foo!' }</div>,
			expect1: '<div data-infernoroot="">Hello world, <!---->Foo!</div>',
			expect2: '<div>Hello world, Foo!</div>'
		},
		{
			node: <div>Hello world, { [ 'Foo!', 'Bar!' ] }</div>,
			expect1: '<div data-infernoroot="">Hello world, <!---->Foo!<!---->Bar!<!--!--></div>',
			expect2: '<div>Hello world, Foo!Bar!</div>'
		},
		{<commit_msg>fix typo in hydration.spec.jsx.js<commit_after>import renderToString from './../../server/renderToString';
import Component from './../../component/es2015';
import { render } from './../../DOM/rendering';
import {
	createContainerWithHTML,
	validateNodeTree
} from '../../tools/utils';
import {
	createStaticVElement,
	createOptBlueprint,
	createVComponent,
	createOptVElement
} from './../../core/shapes';
import {
	ChildrenTypes,
	ValueTypes,
	NodeTypes
} from './../../core/constants';

const Inferno = {
	createOptVElement,
	createStaticVElement,
	createOptBlueprint,
	createVComponent,
	ChildrenTypes,
	ValueTypes,
	NodeTypes
};

function Comp1() {
	return <span>Worked!</span>;
}

function Comp2() {
	return <em>Worked 2!</em>;
}

class Comp3 extends Component {
	render() {
		return <em>Works{ ' ' }<span>again</span>!</em>;
	}
}

function Comp4({ children }) {
	return <section>{children}</section>;
}

describe('SSR Hydration - (JSX)', () => {
	[
		{
			node: <div><span>Hello world</span></div>,
			expect1: '<div data-infernoroot=""><span>Hello world</span></div>',
			expect2: '<div><span>Hello world</span></div>'
		},
		{
			node: <div><p>Hello world<sup><a>Foo</a></sup></p></div>,
			expect1: '<div data-infernoroot=""><p>Hello world<sup><a>Foo</a></sup></p></div>',
			expect2: '<div><p>Hello world<sup><a>Foo</a></sup></p></div>'
		},
		{
			node: <div>{ <span>Hello world</span> }</div>,
			expect1: '<div data-infernoroot=""><span>Hello world</span></div>',
			expect2: '<div><span>Hello world</span></div>'
		},
		{
			node: <div><span>{ <span>Hello world</span> }</span></div>,
			expect1: '<div data-infernoroot=""><span><span>Hello world</span></span></div>',
			expect2: '<div><span><span>Hello world</span></span></div>'
		},
		{
			node: <div>Hello world</div>,
			expect1: '<div data-infernoroot="">Hello world</div>',
			expect2: '<div>Hello world</div>'
		},
		{
			node: <div><svg className={(() => 'foo')()} viewBox="0 0 64 64"></svg></div>,
			expect1: '<div data-infernoroot=""><svg class="foo" viewBox="0 0 64 64"></svg></div>',
			expect2: '<div><svg class="foo" viewBox="0 0 64 64"></svg></div>'
		},
		{
			node: <Comp4><h1>Hello world</h1><p><em>Foo</em></p><p>Woot</p><p><em>Bar</em></p></Comp4>,
			expect1: '<section data-infernoroot=""><h1>Hello world</h1><p><em>Foo</em></p><p>Woot</p><p><em>Bar</em></p></section>',
			expect2: '<section><h1>Hello world</h1><p><em>Foo</em></p><p>Woot</p><p><em>Bar</em></p></section>'
		},
		{
			node: <div>Hello world, { 'Foo!' }</div>,
			expect1: '<div data-infernoroot="">Hello world, <!---->Foo!</div>',
			expect2: '<div>Hello world, Foo!</div>'
		},
		{
			node: <div>Hello world, { [ 'Foo!', 'Bar!' ] }</div>,
			expect1: '<div data-infernoroot="">Hello world, <!---->Foo!<!---->Bar!<!--!--></div>',
			expect2: '<div>Hello world, Foo!Bar!</div>'
		},
		{
{'fraction_non_alphanumeric': 0.2644671841919548, 'fraction_numerical': 0.0187014820042343, 'mean_word_length': 4.28331780055918, 'pattern_counts': {'":': 0, '<': 307, '<?xml version=': 0, '>': 311, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7235375', 'n_tokens_mistral': 2336, 'n_tokens_neox': 2115, 'n_words': 363}