<commit_before>module('Sparky.filters', function(fixture) {
	test("Sparky.filters.add", function() {
		ok(Sparky.filters.add.call('5.5', 3.5) === 9);
	});

	test("Sparky.filters.slugify", function() {
		ok(Sparky.filters.slugify.call('Pardon Me sir') === 'pardon-me-sir');
	});

	test("Sparky.filters.yesno", function() {
		ok(Sparky.filters.yesno.call(true, '1', '2') === '1');
		ok(Sparky.filters.yesno.call({}, '1', '2') === '1');
		ok(Sparky.filters.yesno.call(false, '1', '2') === '2');
		ok(Sparky.filters.yesno.call(undefined, '1', '2') === '2');
		ok(Sparky.filters.yesno.call(null, '1', '2') === '2');
	});

	test("Sparky.filters.prepad", function() {
		ok(Sparky.filters.prepad.call('barf', '9') === '     barf');
		// TODO: This is failing - FIX in filter fn!
		//ok(Sparky.filters.prepad.call('barf', '2') === 'barf');
	});

	test("Sparky.filters.postpad", function() {
		ok(Sparky.filters.postpad.call('barf', '9') === 'barf     ');
		ok(Sparky.filters.postpad.call('barf', '4') === 'barf');
		ok(Sparky.filters.postpad.call('barf', '2') === 'ba');
	});
});


//	capfirst
//	cut
//	prepad
//	postpad
//	date
//	decimals: Number.prototype.toFixed,
//	
//	// .default() can't work, because Sparky does not send undefined or null
//	// values to be filtered. 
//	//'default'
//	//dictsort
//	//dictsortreversed
//	//divisibleby
//	
//	escape
//	first
//	floatformat
//	//get_digit
//	//iriencode
//	join
//	json
//	last
//	length<commit_msg>Updates filter tests to match new filter params<commit_after>module('Sparky.filters', function(fixture) {
	test("Sparky.filters.add", function() {
		ok(Sparky.filters.add('5.5', 3.5) === 9);
	});

	test("Sparky.filters.slugify", function() {
		ok(Sparky.filters.slugify('Pardon Me sir') === 'pardon-me-sir');
	});

	test("Sparky.filters.yesno", function() {
		ok(Sparky.filters.yesno(true, '1', '2') === '1');
		ok(Sparky.filters.yesno({}, '1', '2') === '1');
		ok(Sparky.filters.yesno(false, '1', '2') === '2');
		ok(Sparky.filters.yesno(undefined, '1', '2') === '2');
		ok(Sparky.filters.yesno(null, '1', '2') === '2');
	});

	test("Sparky.filters.prepad", function() {
		ok(Sparky.filters.prepad('barf', '9') === '     barf');
		// TODO: This is failing - FIX in filter fn!
		//ok(Sparky.filters.prepad('barf', '2') === 'barf');
	});

	test("Sparky.filters.postpad", function() {
		ok(Sparky.filters.postpad('barf', '9') === 'barf     ');
		ok(Sparky.filters.postpad('barf', '4') === 'barf');
		ok(Sparky.filters.postpad('barf', '2') === 'ba');
	});
});


//	capfirst
//	cut
//	prepad
//	postpad
//	date
//	decimals: Number.prototype.toFixed,
//	
//	// .default() can't work, because Sparky does not send undefined or null
//	// values to be filtered. 
//	//'default'
//	//dictsort
//	//dictsortreversed
//	//divisibleby
//	
//	escape
//	first
//	floatformat
//	//get_digit
//	//iriencode
//	join
//	json
//	last
//	length
{'fraction_non_alphanumeric': 0.2566063977746871, 'fraction_numerical': 0.017385257301808066, 'mean_word_length': 3.467391304347826, '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': '5768996', 'n_tokens_mistral': 1233, 'n_tokens_neox': 1184, 'n_words': 200}