<commit_before>var unexpected = require('unexpected');
var unexpectedReact = require('unexpected-react');
var unexpectedSinon = require('unexpected-sinon');
var expect = unexpected
	.clone()
	.installPlugin(unexpectedReact)
	.installPlugin(unexpectedSinon);

var React = require('react');
var ReactDOM = require('react-dom');
var TestUtils = require('react-addons-test-utils');
var sinon = require('sinon');


var Select = require('../src/Select');
if (!global.document) {
	global.document = {};
}

describe('Async', () => {

	var renderer;
	var loadOptions;

	const typeSearchText = function(text) {
		const output = renderer.getRenderOutput();
		// onInputChange is actually bound to loadOptions(...),
		// loadOptions returns the promise, if there is one, so we can use this<commit_msg>Emulating DOM even for shallow renderer tests<commit_after>// Emulating the DOM here, only so that if this test file gets
// included first, then React thinks there's a DOM, so the other tests
// (e.g. Select-test.js) that do require a DOM work correctly

var jsdomHelper = require('../testHelpers/jsdomHelper');
jsdomHelper();
var unexpected = require('unexpected');
var unexpectedReact = require('unexpected-react');
var unexpectedSinon = require('unexpected-sinon');
var expect = unexpected
	.clone()
	.installPlugin(unexpectedReact)
	.installPlugin(unexpectedSinon);

var React = require('react');
var ReactDOM = require('react-dom');
var TestUtils = require('react-addons-test-utils');
var sinon = require('sinon');


var Select = require('../src/Select');

describe('Async', () => {

	var renderer;
	var loadOptions;

	const typeSearchText = function(text) {
		const output = renderer.getRenderOutput();
		// onInputChange is actually bound to loadOptions(...),
		// loadOptions returns the promise, if there is one, so we can use this
{'fraction_non_alphanumeric': 0.1355191256830601, 'fraction_numerical': 0.0, 'mean_word_length': 5.042904290429043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1831113', 'n_tokens_mistral': 540, 'n_tokens_neox': 525, 'n_words': 166}