function clbk( error, errs ) {
		if ( error ) {
			t.ok( false, error.message );
		}
		t.strictEqual( isEmptyArray( errs ), true, 'returns an empty array' );
		t.end();
	}
' // Note: we need to explicitly set `ignore` to ensure that test coverage can run in a "build" directory. Because we explicitly set the `dir` option, searching a large directory tree is not an issue.
		]
	};

	lint( opts, clbk );

	function mock() {
		var cb = arguments[ arguments.length-1 ];
		setTimeout( onTimeout, 0 );
		function onTimeout() {
			cb( new Error( 'beep' ) );
		}
	}

	function clbk( error ) {
		t.ok( error, 'returns an error' );
		t.end();
	}
});

tape( 'the function returns an empty array if all files are valid', opts, function test( t ) {
	var opts = {
		'dir': join( __dirname, 'fixtures', 'good' ),
		'ignore': [
			'node_modules/**' // Note: we need to explicitly set `ignore` to ensure that test coverage can run in a "build" directory. Because we explicitly set the `dir` option, searching a large directory tree is not an issue.
		]
	};
	lint( opts, clbk );

	function clbk( error, errs ) {
		if ( error ) {
			t.ok( false, error.message );
		}
		t.strictEqual( isEmptyArray( errs ), true, 'returns an empty array' );
		t.end();
	}
});

tape( 'the function returns an object array if files are not valid', opts, function test( t ) {
	var opts = {
		'dir': join( __dirname, 'fixtures', 'bad' ),
		'ignore': [
			'node_modules/**' // Note: we need to explicitly set `ignore` to ensure that test coverage can run in a "build" directory. Because we explicitly set the `dir` option, searching a large directory tree is not an issue.
		]
	};
	lint( opts, clbk );

	function clbk( error, errs ) {
		if ( error ) {
			t.ok( false, error.message );
		}
		t.strictEqual( isObjectArray( errs ), true, 'returns an object array' );
		t.end();
	}
});

tape( 'the function returns an object array if files are not valid (multiple headers)', opts, function test( t ) {
	var opts = {
		'dir': join( __dirname, 'fixtures', 'multiple' ),
		'ignore': [
			'node_modules/**' // Note: we need to explicitly set `ignore` to ensure that test coverage can run in a "build" directory. Because we explicitly set the `dir` option, searching a large directory tree is not an issue.
		]
	};
	lint( opts, clbk );

	function clbk( error, errs ) {
		if ( error ) {
			t.ok( false, error.message );
		}
		t.strictEqual( isObjectArray( errs ), true, 'returns an object array' );
		t.strictEqual( errs.length, 1, 'has expected length' );
		t.end();
	}
});

tape( 'the function returns an object array if files are not valid (start location)', opts, function test( t ) {
	var opts = {
		'dir': join( __dirname, 'fixtures', 'start-location' ),
		'ignore': [
			'node_modules/**' // Note: we need to explicitly set `ignore` to ensure that test coverage can run in a "build" directory. Because we explicitly set the `dir` option, searching a large directory tree is not an issue.
		]
	};
	lint( opts, clbk );

	function clbk( error, errs ) {
		if ( error ) {
			t.ok( false, error.message );
		}
		t.strictEqual( isObjectArray( errs ), true, 'returns an object array' );
		t.strictEqual( errs.length, 1, 'has expected length' );
		t.end();
	}
});

tape( 'the function supports specifying a filename pattern (valid)', opts, function test( t ) {
	var opts = {
		'dir': join( __dirname, 'fixtures', 'good' ),
		'pattern': '*