<commit_before>'use strict';

// MODULES //

var tape = require( 'tape' );
var isOdd = require( './../lib/object.js' );


// TESTS //

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

tape( 'the function returns `true` if provided an odd number object', function test( t ) {
	t.equal( isOdd( new Number( 5 ) ), true, 'returns true' );
	t.end();
});

tape( 'the function returns `false` if provided a primitive number, even if the number is odd', function test( t ) {
	t.equal( isOdd( 5.0 ), false, 'returns false' );
	t.end();
});

tape( 'function returns `false` if not provided an odd number', function test( t ) {
	var values;
	var i;

	values = [
		'5',
		4,
		null,
		true,
		undefined,<commit_msg>Add missing test for negative odd number objects<commit_after>'use strict';

// MODULES //

var tape = require( 'tape' );
var isOdd = require( './../lib/object.js' );


// TESTS //

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

tape( 'the function returns `true` if provided an odd number object', function test( t ) {
	t.equal( isOdd( new Number( 5 ) ), true, 'returns true' );
	t.equal( isOdd( new Number( -3 ) ), true, 'returns true' );
	t.end();
});

tape( 'the function returns `false` if provided a primitive number, even if the number is odd', function test( t ) {
	t.equal( isOdd( 5.0 ), false, 'returns false' );
	t.equal( isOdd( -1.0 ), false, 'returns false' );
	t.end();
});

tape( 'function returns `false` if not provided an odd number', function test( t ) {
	var values;
	var i;

	values = [
		'5',
		4,
		null,
		true,
		undefined,
{'fraction_non_alphanumeric': 0.16862745098039217, 'fraction_numerical': 0.007282913165266107, 'mean_word_length': 3.4207920792079207, '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': '5104532', 'n_tokens_mistral': 646, 'n_tokens_neox': 629, 'n_words': 232}