<commit_before>
xdescribe('Google Calendar plugin', function() {

	var API_KEY = '<KEY>';
	var HOLIDAY_CALENDAR_ID = 'en.usa#<EMAIL>';
	var options;
	var currentWarnArgs;
	var oldConsoleWarn;

	beforeEach(function() {
		affix('#cal');

		options = {
			defaultView: 'month',
			defaultDate: '2016-11-01'
		};

		// Intercept calls to console.warn
		currentWarnArgs = null;
		oldConsoleWarn = console.warn;
		console.warn = function() {
			currentWarnArgs = arguments;
		};
	});

	afterEach(function() {
		$.mockjax.clear();
		$.mockjaxSettings.log = function() { };
		console.warn = oldConsoleWarn;
	});

	it('request/receives correctly when local timezone', function(done) {
		options.googleCalendarApiKey = API_KEY;
		options.events = { googleCalendarId: HOLIDAY_CALENDAR_ID };
		options.timezone = 'local';
		options.eventAfterAllRender = function() {
			var currentRequest = $.mockjax.unmockedAjaxCalls()[0];
			var events = $('#cal').fullCalendar('clientEvents');
			var i;

			expect(currentRequest.data.timeMin).toEqual('2016-10-29T00:00:00Z'); // one day before, by design
			expect(currentRequest.data.timeMax).toEqual('2016-12-12T00:00:00Z'); // one day after, by design
			expect(currentRequest.data.timeZone).toBeUndefined();

			expect(events.length).toBe(5);
			for (i = 0; i < events.length; i++) {
				expect(events[i].url).not.toMatch('ctz=');
			}

			done();
		};
		$('#cal').fullCalendar(options);
	});

	it('request/receives correctly when UTC timezone', function(done) {
		options.googleCalendarApiKey = API_KEY;
		options.events = { googleCalendarId: HOLIDAY_CALENDAR_ID };<commit_msg>temporary do one test for gcal<commit_after>
fdescribe('Google Calendar plugin', function() {

	var API_KEY = '<KEY>';
	var HOLIDAY_CALENDAR_ID = 'en.usa<EMAIL>';
	var options;
	var currentWarnArgs;
	var oldConsoleWarn;

	beforeEach(function() {
		affix('#cal');

		options = {
			defaultView: 'month',
			defaultDate: '2016-11-01'
		};

		// Intercept calls to console.warn
		currentWarnArgs = null;
		oldConsoleWarn = console.warn;
		console.warn = function() {
			currentWarnArgs = arguments;
		};
	});

	afterEach(function() {
		$.mockjax.clear();
		$.mockjaxSettings.log = function() { };
		console.warn = oldConsoleWarn;
	});

	fit('request/receives correctly when local timezone', function(done) {
		options.googleCalendarApiKey = API_KEY;
		options.events = { googleCalendarId: HOLIDAY_CALENDAR_ID };
		options.timezone = 'local';
		options.eventAfterAllRender = function() {
			var currentRequest = $.mockjax.unmockedAjaxCalls()[0];
			var events = $('#cal').fullCalendar('clientEvents');
			var i;

			expect(currentRequest.data.timeMin).toEqual('2016-10-29T00:00:00Z'); // one day before, by design
			expect(currentRequest.data.timeMax).toEqual('2016-12-12T00:00:00Z'); // one day after, by design
			expect(currentRequest.data.timeZone).toBeUndefined();

			expect(events.length).toBe(5);
			for (i = 0; i < events.length; i++) {
				expect(events[i].url).not.toMatch('ctz=');
			}

			done();
		};
		options.googleCalendarError = function(calendar, message) {
			console.log('GCAL ERROR', message);
		};
		$('#cal').fullCalendar(options);
	});

	it('request/receives correctly when UTC timezone', function(done) {
		options.googleCalendarApiKey = API_KEY;
		options.events = { googleCalendarId: HOLIDAY_CALENDAR_ID };
{'fraction_non_alphanumeric': 0.1557352500748727, 'fraction_numerical': 0.02336028751123091, 'mean_word_length': 4.475409836065574, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '1852169', 'n_tokens_mistral': 1271, 'n_tokens_neox': 1120, 'n_words': 209}