'use strict';

// MODULES //

var tape = require( 'tape' );
var isCapitalized = require( './../lib' );


// TESTS //

tape( 'main export is a function', function test( t ) {
	t.ok( true, __filename );
	t.equal( typeof isCapitalized, 'function', 'main export is a function' );
	t.end();
});

tape( 'the function returns `true` if provided a capitalized string', function test( t ) {
	var values;
	var bool;
	var i;

	values = [
		'Hello World!',
		'The end.'
	];

	for ( i = 0; i < values.length; i++ ) {
		bool = isCapitalized( values[ i ] );
		t.equal( bool, true, 'returns true when provided '+values[ i ] );
	}
	t.end();
});

tape( 'the function returns `false` if not provided a capitalized string', function test( t ) {
	var values;
	var i;

	values = [
		'abc',
		'hello World',
		void 0,
		0,
		NaN,
		null,
		false,
		true,
		[],
		{},
		function(){}
	];

	for ( i = 0; i < values.length; i++ ) {
		t.equal( isCapitalized( values[i] ), false, 'returns false when provided '+values[i] );
	}
	t.end();
});

'use strict';

// MODULES //

var tape = require( 'tape' );
var isCapitalized = require( './../lib' );


// TESTS //

tape( 'main export is a function', function test( t ) {
	t.ok( true, __filename );
	t.equal( typeof isCapitalized, 'function', 'main export is a function' );
	t.end();
});

tape( 'the function returns `true` if provided a capitalized string', function test( t ) {
	var values;
	var bool;
	var i;

	values = [
		'Hello World!',
		'The end.'
	];

	for ( i = 0; i < values.length; i++ ) {
		bool = isCapitalized( values[ i ] );
		t.equal( bool, true, 'returns true when provided '+values[ i ] );
	}
	t.end();
});

tape( 'the function returns `false` if not provided a capitalized string', function test( t ) {
	var values;
	var i;

	values = [
		'abc',
		'hello World',
		void 0,
		0,
		NaN,
		null,
		false,
		true,
		[],
		{},
		function noop() {}
	];

	for ( i = 0; i < values.length; i++ ) {
		t.equal( isCapitalized( values[i] ), false, 'returns false when provided '+values[i] );
	}
	t.end();
});

Fix lint errors