<commit_before>var assert = require( "assert" );

describe( "Duck Duck Go Scrape", function( ){
	
	it( "Is a function", function( ){
		var ddgs = require( "../lib/index.js" );
		assert.equal( "function", typeof( ddgs ) );
	} );

	it( "Returns an instance", function( ){
		var ddgs = require( "../lib/index.js" );
		var _ddgs = new ddgs( );
		assert.ok( _ddgs instanceof ddgs );
	} );

	describe( "Instance", function( ){
		var _instance;
		before( function( ){
			var ddgs = require( "../lib/index.js" );
			_instance = new ddgs( );
		} );

		it( "Has Search function", function( ){
			assert.equal( "function", typeof( _instance.Search ) );
		} );

		it( "Search function must have a callback", function( ){
			assert.throws( function( ){
				_instance.Search( "Something to search" );
			} );
		} );

		it( "Returns results", function( cb ){
			_instance.Search( "Walmart", function( err, results ){
				return cb( err, results );
			} );
		} );
	} );
} );<commit_msg>Adding another test to confirm there isn't a race condition..<commit_after>var assert = require( "assert" );

describe( "Duck Duck Go Scrape", function( ){
	
	it( "Is a function", function( ){
		var ddgs = require( "../lib/index.js" );
		assert.equal( "function", typeof( ddgs ) );
	} );

	it( "Returns an instance", function( ){
		var ddgs = require( "../lib/index.js" );
		var _ddgs = new ddgs( );
		assert.ok( _ddgs instanceof ddgs );
	} );

	describe( "Instance", function( ){
		var _instance;
		before( function( ){
			var ddgs = require( "../lib/index.js" );
			_instance = new ddgs( );
		} );

		it( "Has Search function", function( ){
			assert.equal( "function", typeof( _instance.Search ) );
		} );

		it( "Search function must have a callback", function( ){
			assert.throws( function( ){
				_instance.Search( "Something to search" );
			} );
		} );

		it( "Returns results", function( cb ){
			_instance.Search( "Walmart", function( err, results ){
				return cb( err, results );
			} );
		} );

		it( "Returns another set of results if queried", function( cb ){
			_instance.Search( "Google", function( err, results ){
				return cb( err, results );
			} );
		} );
	} );
} );
{'fraction_non_alphanumeric': 0.18110236220472442, 'fraction_numerical': 0.0, 'mean_word_length': 3.16988416988417, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4064844', 'n_tokens_mistral': 821, 'n_tokens_neox': 702, 'n_words': 210}