<commit_before>describe('flatpickr', () => {

	const container = document.querySelector('.container');
	let elem;

	const init = () => {
		container.innerHTML = '<input type="text" class="flatpickr" style="display:none;" />';
		elem = container.querySelector('.flatpickr');
	};

	describe("datetimestring parser", () => {

		describe("date string parser", () => {

			it('should parse "2016-10"', () => {
				init();
				const fp = elem.flatpickr({
					defaultDate: "2016-10"
				});

				expect(fp.selectedDates[0]).toBeDefined();
				expect(fp.selectedDates[0].getFullYear()).toEqual(2016);
				expect(fp.selectedDates[0].getMonth()).toEqual(9);
			});

			it('should parse "2016-10-20 3:30"', () => {
				init();
				const fp = elem.flatpickr({
					defaultDate: "2016-10-20 3:30"
				});

				expect(fp.selectedDates[0]).toBeDefined();
				expect(fp.selectedDates[0].getFullYear()).toEqual(2016);
				expect(fp.selectedDates[0].getMonth()).toEqual(9);
				expect(fp.selectedDates[0].getDate()).toEqual(20);
				expect(fp.selectedDates[0].getHours()).toEqual(3);
				expect(fp.selectedDates[0].getMinutes()).toEqual(30);
			});

			it('should parse ISO8601', () => {
				init();
				const fp = elem.flatpickr({
					defaultDate: "2007-03-04T21:08:12",
					enableTime: true,<commit_msg>Add timestamp test case<commit_after>describe('flatpickr', () => {

	const container = document.querySelector('.container');
	let elem;

	const init = () => {
		container.innerHTML = '<input type="text" class="flatpickr" style="display:none;" />';
		elem = container.querySelector('.flatpickr');
	};

	describe("datetimestring parser", () => {

		describe("date string parser", () => {

			it('should parse timestamp', () => {
				init();
				const fp = elem.flatpickr({
					defaultDate: 1477111633771
				});

				expect(fp.selectedDates[0]).toBeDefined();
				expect(fp.selectedDates[0].getFullYear()).toEqual(2016);
				expect(fp.selectedDates[0].getMonth()).toEqual(9);

			});

			it('should parse "2016-10"', () => {
				init();
				const fp = elem.flatpickr({
					defaultDate: "2016-10"
				});

				expect(fp.selectedDates[0]).toBeDefined();
				expect(fp.selectedDates[0].getFullYear()).toEqual(2016);
				expect(fp.selectedDates[0].getMonth()).toEqual(9);
			});

			it('should parse "2016-10-20 3:30"', () => {
				init();
				const fp = elem.flatpickr({
					defaultDate: "2016-10-20 3:30"
				});

				expect(fp.selectedDates[0]).toBeDefined();
				expect(fp.selectedDates[0].getFullYear()).toEqual(2016);
				expect(fp.selectedDates[0].getMonth()).toEqual(9);
				expect(fp.selectedDates[0].getDate()).toEqual(20);
				expect(fp.selectedDates[0].getHours()).toEqual(3);
				expect(fp.selectedDates[0].getMinutes()).toEqual(30);
			});

			it('should parse ISO8601', () => {
				init();
				const fp = elem.flatpickr({
					defaultDate: "2007-03-04T21:08:12",
					enableTime: true,
{'fraction_non_alphanumeric': 0.20228611014894354, 'fraction_numerical': 0.05992379632836855, 'mean_word_length': 3.9367521367521365, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, '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': '6458059', 'n_tokens_mistral': 1268, 'n_tokens_neox': 983, 'n_words': 134}