Added some documentation to Karma configuration files.

This commit is contained in:
Usman Khalid
2016-05-05 18:43:13 +05:00
parent 667a9b9ae6
commit a2dadeaaf3
9 changed files with 51 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
// Karma config for xmodule suite.
// Docs in common/static/common/js/karma.common.conf.js
// Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js
/* jshint node: true */
/*jshint -W079 */
@@ -16,6 +16,7 @@ var options = {
return pattern;
},
// Avoid adding files to this list. Use RequireJS.
libraryFilesToInclude: [
{pattern: 'common_static/js/vendor/requirejs/require.js', included: true},
{pattern: 'RequireJS-namespace-undefine.js', included: true},
@@ -55,6 +56,8 @@ var options = {
{pattern: 'common_static/edx-pattern-library/js/**/*.js'}
],
// Make sure the patterns in sourceFiles and specFiles do not match the same file.
// Otherwise Istanbul which is used for coverage tracking will cause tests to not run.
sourceFiles: [
{pattern: 'src/xmodule.js', included: true, ignoreCoverage: true}, // To prevent getting instrumented twice.
{pattern: 'src/**/*.js', included: true}