<commit_before>/*!
 * @author      <NAME> - github.com/finalangel/classjs-plugins
 * @copyright	Distributed under the BSD License.
 */

/*
 * TESTS
 */

var uniform = new Cl.Uniform();

module('cl.carousel.js');

test('Options', function() {
	var options = ['offset'];
	var defaults = [-9999];
	// tests
	$.each(options, function (index, option) {
		deepEqual(uniform.options[option], defaults[index], option + ' is available');
	});

	// custom checks
	var cls = uniform.options.cls;
	equal(cls.prefix, 'uniform', 'prefix is availalbe');
	equal(cls.radio, 'radio', 'radio is availalbe');
	equal(cls.checkbox, 'checkbox', 'checkbox is availalbe');
	equal(cls.file, 'file', 'file is availalbe');
	equal(cls.select, 'select', 'select is availalbe');
	equal(cls.disabled, 'disabled', 'disabled is availalbe');
	equal(cls.focus, 'focus', 'focus is availalbe');

	var lang = uniform.options.lang;
	equal(lang.fileBtn, 'Upload', 'fileBtn is availalbe');
	equal(lang.fileStatus, 'Please select a file...', 'fileStatus is availalbe');

	var clsLength = getLength(uniform.options.cls);
	ok(clsLength === 7, 'there are ' + clsLength + ' cls options');

	var langLength = getLength(uniform.options.lang);
	ok(langLength === 2, 'there are ' + clsLength + ' lang options');

	var tplLength = getLength(uniform.options.tpl);
	ok(tplLength === 4, 'there are ' + tplLength + ' tpl options');

	var length = getLength(uniform.options);
	ok(length === 4, 'there are ' + length + ' options');
});

test('Methods', function() {
	var methods = ['update', 'destroy'];
	// tests
	$.each(methods, function (index, method) {
		equal(typeof(uniform[method]), 'function', method + ' is available');
	});

	// check method count
	ok(methods.length === 2, 'there are ' + methods.length + ' methods');
});<commit_msg>added test case for issue #41<commit_after>/*!
 * @author      <NAME> - github.com/finalangel/classjs-plugins
 * @copyright	Distributed under the BSD License.
 */

/*
 * TESTS
 */

var uniform = new Cl.Uniform();

module('cl.carousel.js');

test('Options', function() {
	var options = ['offset'];
	var defaults = [-9999];
	// tests
	$.each(options, function (index, option) {
		deepEqual(uniform.options[option], defaults[index], option + ' is available');
	});

	// custom checks
	var cls = uniform.options.cls;
	equal(cls.prefix, 'uniform', 'prefix is availalbe');
	equal(cls.radio, 'radio', 'radio is availalbe');
	equal(cls.checkbox, 'checkbox', 'checkbox is availalbe');
	equal(cls.file, 'file', 'file is availalbe');
	equal(cls.select, 'select', 'select is availalbe');
	equal(cls.disabled, 'disabled', 'disabled is availalbe');
	equal(cls.focus, 'focus', 'focus is availalbe');

	var lang = uniform.options.lang;
	equal(lang.fileBtn, 'Upload', 'fileBtn is availalbe');
	equal(lang.fileStatus, 'Please select a file...', 'fileStatus is availalbe');

	var clsLength = getLength(uniform.options.cls);
	ok(clsLength === 7, 'there are ' + clsLength + ' cls options');

	var langLength = getLength(uniform.options.lang);
	ok(langLength === 2, 'there are ' + clsLength + ' lang options');

	var tplLength = getLength(uniform.options.tpl);
	ok(tplLength === 4, 'there are ' + tplLength + ' tpl options');

	var length = getLength(uniform.options);
	ok(length === 4, 'there are ' + length + ' options');
});

test('Methods', function() {
	var methods = ['update', 'destroy'];
	// tests
	$.each(methods, function (index, method) {
		equal(typeof(uniform[method]), 'function', method + ' is available');
	});

	// check method count
	ok(methods.length === 2, 'there are ' + methods.length + ' methods');
});

test('Test for issue #41: Uniform Upload in IE', function() {
	var fixture = $('#qunit-fixture');
	fixture.append('<form action="." method="post"><input type="file" class="uniform" /></form>');
	fixture.find('form').on('submit', function (e) {
		e.preventDefault();
	});
	new Cl.Uniform('.uniform');
	// set a value
	var upload = fixture.find('input[type="file"]');

	ok(upload.length === 1, 'upload field is available.');
});
{'fraction_non_alphanumeric': 0.18690890990542558, 'fraction_numerical': 0.005724240915878547, 'mean_word_length': 4.636746143057503, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '1262664', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1297, 'n_words': 349}