{"size": 1198, "ext": "js", "max_stars_repo_path": "node_modules/cal-heatmap/test/src/api/init-itemNamespace.js", "max_stars_repo_name": "PedroF20/angular-traceMySteps", "max_stars_repo_stars_event_min_datetime": "2015-08-20T06:05:08.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-26T09:23:11.000Z", "max_issues_repo_path": "node_modules/cal-heatmap/test/src/api/init-itemNamespace.js", "max_issues_repo_name": "PedroF20/angular-traceMySteps", "max_issues_repo_issues_event_min_datetime": "2015-09-15T09:16:29.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-27T17:25:05.000Z", "max_forks_repo_path": "node_modules/cal-heatmap/test/src/api/init-itemNamespace.js", "max_forks_repo_name": "PedroF20/angular-traceMySteps", "max_forks_repo_forks_event_min_datetime": "2015-08-21T15:49:15.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-16T08:04:20.000Z"}
{"max_stars_count": 1278, "max_issues_count": 140, "max_forks_count": 190, "avg_line_length": 46.0769230769, "max_line_length": 108, "alphanum_fraction": 0.6794657763}
/*
	-----------------------------------------------------------------
	SETTINGS
	Test itemNamespace setting passed to init()
	-----------------------------------------------------------------
 */

module("API: init(itemNamespace)");

function __testItemNamespaceSetting(title, value, expected) {
	test(title, function() {
		expect(1);

		var cal = createCalendar({ itemNamespace: value });
		equal(cal.options.itemNamespace, expected, "itemNamespace is set to " + expected);
	});
}

__testItemNamespaceSetting("null will fallback to default namespace", null, "cal-heatmap");
__testItemNamespaceSetting("false will fallback to default namespace", false, "cal-heatmap");
__testItemNamespaceSetting("empty string will fallback to default namespace", "", "cal-heatmap");
__testItemNamespaceSetting("invalid value (array) will fallback to default namespace", [], "cal-heatmap");
__testItemNamespaceSetting("invalid value (object) will fallback to default namespace", {}, "cal-heatmap");
__testItemNamespaceSetting("invalid value (number) will fallback to default namespace", 126, "cal-heatmap");
__testItemNamespaceSetting("Setting a valid namespace from a string", "test-namespace", "test-namespace");
