<commit_before>// reference: https://github.com/ocombe/ng2-translate/blob/master/karma-test-shim.js

// Turn on full stack traces in errors to help debugging
Error.stackTraceLimit = Infinity;

jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;

// Cancel Karma"s synchronous start,
// we will call `__karma__.start()` later, once all the specs are loaded.
__karma__.loaded = function () { };

const config = {
	baseURL: "/base/",
	defaultJSExtensions: true,
	paths: {
		"npm:*": "node_modules/*"
	},
	map: {
		// vendors
		"lodash": "npm:lodash",
		"@ssv": "npm:@ssv",
	},
	packages: {
		// vendors
		"lodash": { main: "index.js", defaultExtension: "js" },
	}
};

// ssv
const ssvPackageNames = [
	"core",
];

ssvPackageNames.forEach(pkgName => {
	const name = `@ssv/${pkgName}`;
	config.packages[name] = { main: "dist/umd/index.js", defaultExtension: "js" };
});

SystemJS.config(config);
SystemJS.import("test/test-setup")
	.then(function () {
		return Promise.all(resolveTestFiles());
	})
	.then(function () {
		__karma__.start();
	}, function (error) {
		__karma__.error(error.stack || error);
	});

function onlySpecFiles(path) {
	return /[\.|_]spec\.js$/.test(path);
}
function resolveTestFiles() {
	return Object.keys(window.__karma__.files)  // All files served by Karma.
		.filter(onlySpecFiles)
		.map(function (moduleName) {
			return SystemJS.import(moduleName);
		});
}<commit_msg>chore(karma-shim): changed ssv to use umds<commit_after>// reference: https://github.com/ocombe/ng2-translate/blob/master/karma-test-shim.js

// Turn on full stack traces in errors to help debugging
Error.stackTraceLimit = Infinity;

jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;

// Cancel Karma"s synchronous start,
// we will call `__karma__.start()` later, once all the specs are loaded.
__karma__.loaded = function () { };

const config = {
	baseURL: "/base/",
	defaultJSExtensions: true,
	paths: {
		"npm:*": "node_modules/*"
	},
	map: {
		// vendors
		"lodash": "npm:lodash",
		"@ssv": "npm:@ssv",
	},
	packages: {
		// vendors
		"lodash": { main: "index.js", defaultExtension: "js" },
	}
};

// ssv
const ssvPackageNames = [
	"core",
];

ssvPackageNames.forEach(pkgName => {
	const name = `@ssv/${pkgName}`;
	config.packages[name] = { main: `dist/bundles/ssv-${pkgName}.umd.js`, defaultExtension: "js" };
});

SystemJS.config(config);
SystemJS.import("test/test-setup")
	.then(function () {
		return Promise.all(resolveTestFiles());
	})
	.then(function () {
		__karma__.start();
	}, function (error) {
		__karma__.error(error.stack || error);
	});

function onlySpecFiles(path) {
	return /[\.|_]spec\.js$/.test(path);
}
function resolveTestFiles() {
	return Object.keys(window.__karma__.files)  // All files served by Karma.
		.filter(onlySpecFiles)
		.map(function (moduleName) {
			return SystemJS.import(moduleName);
		});
}
{'fraction_non_alphanumeric': 0.18017057569296374, 'fraction_numerical': 0.0035536602700781805, 'mean_word_length': 4.184162062615101, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '721774', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1016, 'n_words': 201}