<commit_before>module("fx");

test("animate(Hash, Object, Function)", function() {
	expect(3);
	stop();
	var hash = {opacity: 'show'};
	var hashCopy = $.extend({}, hash);
	$('#foo').animate(hash, 0, function() {
		ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' );
	});
	// using contents will get comments regular, text, and comment nodes
	$("#nonnodes").contents().animate({paddingLeft:"5px"}, 100, function () {
		equals(this.nodeType, 1, "Check node,textnode,comment animate just does real nodes" );
		equals($(this).css("paddingLeft"), "5px", "Check node,textnode,comment animate just does real nodes" );
		start();
	});
});

test("animate option (queue === false)", function () {
	expect(1);
	stop();

	var order = [];

	var $foo = $("#foo");
	$foo.animate({width:'100px'}, 200, function () {
		// should finish after unqueued animation so second
		order.push(2);
	});
	$foo.animate({fontSize:'2em'}, {queue:false, duration:10, complete:function () {
		// short duration and out of queue so should finish first
		order.push(1);
	}});
	$foo.animate({height:'100px'}, 10, function() {
		// queued behind the first animation so should finish third 
		order.push(3);
		isSet( order, [ 1, 2, 3], "Animations finished in the correct order" );
		start();
	});
});

test("queue() defaults to 'fx' type", function () {
	expect(2);
	stop();
<commit_msg>Removed a unit test that tested to see if queued objects were of a certain type.  It was decided you can queue anything and it is up to the coder to make sure it was intended.<commit_after>module("fx");

test("animate(Hash, Object, Function)", function() {
	expect(3);
	stop();
	var hash = {opacity: 'show'};
	var hashCopy = $.extend({}, hash);
	$('#foo').animate(hash, 0, function() {
		ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' );
	});
});

test("animate option (queue === false)", function () {
	expect(1);
	stop();

	var order = [];

	var $foo = $("#foo");
	$foo.animate({width:'100px'}, 200, function () {
		// should finish after unqueued animation so second
		order.push(2);
	});
	$foo.animate({fontSize:'2em'}, {queue:false, duration:10, complete:function () {
		// short duration and out of queue so should finish first
		order.push(1);
	}});
	$foo.animate({height:'100px'}, 10, function() {
		// queued behind the first animation so should finish third 
		order.push(3);
		isSet( order, [ 1, 2, 3], "Animations finished in the correct order" );
		start();
	});
});

test("queue() defaults to 'fx' type", function () {
	expect(2);
	stop();

{'fraction_non_alphanumeric': 0.18478260869565216, 'fraction_numerical': 0.02096273291925466, 'mean_word_length': 4.530042918454936, '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': '2173590', 'n_tokens_mistral': 881, 'n_tokens_neox': 807, 'n_words': 265}