<commit_before>(function($) {

	/*Timer converts seconds to pretty time*/
	var scenarios = [
		{ 'in': 30, out: '30 sec'},
		{ 'in': 100, out: '1:40 min'},
		{ 'in': 1000, out: '16:40 min'},
		{ 'in': 1432, out: '23:52 min'},
		{ 'in': 3599, out: '59:59 min'},
		{ 'in': 3600, out: '1:00:00'},
		{ 'in': 5000, out: '1:23:20'},
		{ 'in': 10000, out: '2:46:40'},
		{ 'in': 50000, out: '13:53:20'},
		{ 'in': 54321, out: '15:05:21'},
		{ 'in': 84000, out: '23:20:00'}
	];

	scenarios.forEach(function(obj) {
		test('timer converts ' + obj['in'] + ' to ' + obj.out, function() {
			$('#timer').timer({
				seconds: obj['in']
			});
			$('#timer').timer('pause');
			equal($('#timer').val(), obj.out, 'Timer should display ' + obj.out);
			$('#timer').val('').timer('remove');
		});
	});

	


	/*Timer converts pretty time to seconds*/
	var scenarios = [
		{ 'in': '30 sec', out: 30, display: '32 sec' },
		{ 'in': '1:40 min', out: 100, display: '1:42 min' },
		{ 'in': '16:40 min', out: 1000, display: '16:42 min' },
		{ 'in': '23:52 min', out: 1432, display: '23:54 min' },
		{ 'in': '59:59 min', out: 3599, display: '1:00:01' },
		{ 'in': '1:00:00', out: 3600, display: '1:00:02' },
		{ 'in': '1:23:20', out: 5000, display: '1:23:22' },
		{ 'in': '2:46:40', out: 10000, display: '2:46:42' },
		{ 'in': '13:53:20', out: 50000, display: '13:53:22' },
		{ 'in': '15:05:21', out: 54321, display: '15:05:23' },
		{ 'in': '23:20:00', out: 84000, display: '23:20:02' },
	];

	scenarios.forEach(function(obj) {
		test('timer converts ' + obj['in'] + ' to ' + obj.out, function() {
			$('#timer').timer({
				editable: true
			});

			$('#timer').focus();
			$('#timer').val(obj['in']);
			$('#timer').blur();

			stop();

			setTimeout(function() {
				equal($('#timer').val(), obj.display, 'Timer should display ' + obj.display);
				start();

				$('#timer').val('').timer('remove');
			}, 2100);

		});
	});

})(jQuery)<commit_msg>Added test to check if callback executes after set duration.<commit_after>(function($) {

	// Timer executes callback after the specified duration has elapsed
	test('timer executes callback after the specified duration', function() {
		var callbackExecuted = false;

		$('#timer').timer({
			duration: '3s',
			callback: function() {
				callbackExecuted = true;
			}
		});

		// Pause test momentarily
		stop();

		// Check value of callbackExecuted in 3 seconds (+ minor offset to run assertion comfortably)
		setTimeout(function() {
			equal(callbackExecuted, true, 'Timer executes callback after the specified duration has elapsed.');
			$('#timer').val('').timer('remove');

			start();
		}, 3100);
	}); 

	// Timer converts seconds to pretty time
	var scenarios = [
		{ 'in': 30, out: '30 sec'},
		{ 'in': 100, out: '1:40 min'},
		{ 'in': 1000, out: '16:40 min'},
		{ 'in': 1432, out: '23:52 min'},
		{ 'in': 3599, out: '59:59 min'},
		{ 'in': 3600, out: '1:00:00'},
		{ 'in': 5000, out: '1:23:20'},
		{ 'in': 10000, out: '2:46:40'},
		{ 'in': 50000, out: '13:53:20'},
		{ 'in': 54321, out: '15:05:21'},
		{ 'in': 84000, out: '23:20:00'}
	];

	scenarios.forEach(function(obj) {
		test('timer converts ' + obj['in'] + ' to ' + obj.out, function() {
			$('#timer').timer({
				seconds: obj['in']
			});
			$('#timer').timer('pause');
			equal($('#timer').val(), obj.out, 'Timer should display ' + obj.out);
			$('#timer').val('').timer('remove');
		});
	});

	


	// Timer converts pretty time to seconds
	var scenarios = [
		{ 'in': '30 sec', out: 30, display: '32 sec' },
		{ 'in': '1:40 min', out: 100, display: '1:42 min' },
		{ 'in': '16:40 min', out: 1000, display: '16:42 min' },
		{ 'in': '23:52 min', out: 1432, display: '23:54 min' },
		{ 'in': '59:59 min', out: 3599, display: '1:00:01' },
		{ 'in': '1:00:00', out: 3600, display: '1:00:02' },
		{ 'in': '1:23:20', out: 5000, display: '1:23:22' },
		{ 'in': '2:46:40', out: 10000, display: '2:46:42' },
		{ 'in': '13:53:20', out: 50000, display: '13:53:22' },
		{ 'in': '15:05:21', out: 54321, display: '15:05:23' },
		{ 'in': '23:20:00', out: 84000, display: '23:20:02' },
	];

	scenarios.forEach(function(obj) {
		test('timer converts ' + obj['in'] + ' to ' + obj.out, function() {
			$('#timer').timer({
				editable: true
			});

			$('#timer').focus();
			$('#timer').val(obj['in']);
			$('#timer').blur();

			stop();

			setTimeout(function() {
				equal($('#timer').val(), obj.display, 'Timer should display ' + obj.display);
				start();

				$('#timer').val('').timer('remove');
			}, 2150);

		});
	});

})(jQuery)
{'fraction_non_alphanumeric': 0.26495347806823216, 'fraction_numerical': 0.10988037217545414, 'mean_word_length': 3.6933471933471935, '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': '5598647', 'n_tokens_mistral': 2236, 'n_tokens_neox': 1739, 'n_words': 435}