Commit 15acec20 by Usman Khalid

Simplify paths patterns in karma config files.

Files which are loaded via RequireJs do not need to be individually
declared in karma config files. If we give karma directories,
it will serve all the files in them.
parent 713c79e0
......@@ -8,74 +8,38 @@ var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
var files = {
libraryFilesToInclude: [
{pattern: 'xmodule_js/common_static/js/libs/jasmine-extensions.js', included: true}
],
libraryFiles: [
{pattern: 'xmodule_js/common_static/coffee/src/ajax_prefix.js'},
{pattern: 'xmodule_js/common_static/js/src/utility.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery-ui.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.cookie.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.simulate.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/underscore.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/underscore.string.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/backbone.js'},
{pattern: 'xmodule_js/common_static/js/vendor/backbone-associations-min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/backbone-relational.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/timepicker/jquery.timepicker.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.leanModal.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.ajaxQueue.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.form.js'},
{pattern: 'xmodule_js/common_static/js/vendor/html5-input-polyfills/number-polyfill.js'},
{pattern: 'xmodule_js/common_static/js/vendor/sinon-1.17.0.js'},
{pattern: 'xmodule_js/common_static/js/vendor/Squire.js'},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-stealth.js'},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-waituntil.js'},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-extensions.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/jasmine-imagediff.js'},
{pattern: 'xmodule_js/common_static/js/vendor/CodeMirror/codemirror.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/**/*.js'},
{pattern: 'xmodule_js/src/xmodule.js'},
{pattern: 'xmodule_js/common_static/js/test/i18n.js'},
{pattern: 'xmodule_js/common_static/js/vendor/draggabilly.js'},
{pattern: 'xmodule_js/common_static/js/vendor/date.js'},
{pattern: 'xmodule_js/common_static/js/vendor/domReady.js'},
{pattern: 'xmodule_js/common_static/js/vendor/URI.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.smooth-scroll.min.js'},
{pattern: 'xmodule_js/common_static/coffee/src/jquery.immediateDescendents.js'},
{pattern: 'xmodule_js/common_static/js/xblock/**/*.js'},
{pattern: 'xmodule_js/common_static/coffee/src/xblock/**/*.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.iframe-transport.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-process.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-validate.js'},
{pattern: 'xmodule_js/common_static/js/vendor/mock-ajax.js'},
{pattern: 'xmodule_js/common_static/js/vendor/requirejs/text.js'},
{pattern: 'edx-ui-toolkit/js/utils/global-loader.js'},
{pattern: 'edx-pattern-library/js/modernizr-custom.js'},
{pattern: 'edx-pattern-library/js/afontgarde.js'},
{pattern: 'edx-pattern-library/js/edx-icons.js'},
{pattern: 'edx-pattern-library/js/**/*.js'},
{pattern: 'edx-ui-toolkit/js/**/*.js'},
{pattern: 'xmodule_js/common_static/coffee/src/**/*.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/**/*.js'},
{pattern: 'xmodule_js/common_static/js/**/*.js'},
{pattern: 'xmodule_js/src/xmodule.js'},
{pattern: 'common/js/utils/require-serial.js', included: true}
{pattern: 'xmodule_js/common_static/js/libs/jasmine-stealth.js'},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-waituntil.js'}
],
sourceFiles: [
{pattern: 'coffee/src/**/!(*spec).js'},
{pattern: 'js/**/!(*spec).js'},
{pattern: 'common/js/**/!(*spec).js'}
{pattern: 'common/js/**/!(*spec).js'},
{pattern: 'js/**/!(*spec).js'}
],
specFiles: [
{pattern: 'coffee/spec/**/*spec.js'},
{pattern: 'js/spec/**/*spec.js'},
{pattern: 'js/certificates/spec/**/*spec.js'}
{pattern: 'js/certificates/spec/**/*spec.js'},
{pattern: 'js/spec/**/*spec.js'}
],
fixtureFiles: [
{pattern: 'coffee/fixtures/**/*.underscore'},
{pattern: 'templates/**/*.underscore'},
{pattern: 'common/templates/**/*.underscore'}
{pattern: 'common/templates/**/*.underscore'},
{pattern: 'templates/**/*.underscore'}
],
runFiles: [
......
......@@ -8,61 +8,34 @@ var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
var files = {
libraryFilesToInclude: [
{pattern: 'xmodule_js/common_static/js/libs/jasmine-extensions.js', included: true}
],
libraryFiles: [
{pattern: 'xmodule_js/common_static/js/vendor/requirejs/require.js'},
{pattern: 'xmodule_js/common_static/coffee/src/ajax_prefix.js'},
{pattern: 'xmodule_js/common_static/js/src/utility.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery-ui.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.cookie.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/underscore.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/underscore.string.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/backbone.js'},
{pattern: 'xmodule_js/common_static/js/vendor/backbone-associations-min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/timepicker/jquery.timepicker.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.leanModal.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.form.js'},
{pattern: 'xmodule_js/common_static/js/vendor/html5-input-polyfills/number-polyfill.js'},
{pattern: 'xmodule_js/common_static/js/vendor/sinon-1.17.0.js'},
{pattern: 'xmodule_js/common_static/js/vendor/Squire.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jasmine-imagediff.js'},
{pattern: 'xmodule_js/common_static/js/vendor/CodeMirror/codemirror.js'},
{pattern: 'xmodule_js/common_static/js/vendor/domReady.js'},
{pattern: 'xmodule_js/common_static/js/vendor/URI.min.js'},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-extensions.js', included: true},
{pattern: 'xmodule_js/src/xmodule.js'},
{pattern: 'xmodule_js/common_static/coffee/src/jquery.immediateDescendents.js'},
{pattern: 'xmodule_js/common_static/js/test/i18n.js'},
{pattern: 'xmodule_js/common_static/js/xblock/**/*.js'},
{pattern: 'xmodule_js/common_static/coffee/src/xblock/**/*.js'},
{pattern: 'xmodule_js/common_static/js/vendor/URI.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.iframe-transport.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-process.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-validate.js'},
{pattern: 'xmodule_js/common_static/js/vendor/requirejs/text.js'},
{pattern: 'common/js/utils/require-serial.js', included: true}
{pattern: 'edx-pattern-library/js/**/*.js'},
{pattern: 'edx-ui-toolkit/js/**/*.js'},
{pattern: 'xmodule_js/common_static/coffee/src/**/*.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/**/*.js'},
{pattern: 'xmodule_js/common_static/js/**/*.js'},
{pattern: 'xmodule_js/src/**/*.js'},
],
sourceFiles: [
{pattern: 'coffee/src/**/*.js'},
{pattern: 'js/collections/**/*.js'},
{pattern: 'js/models/**/*.js'},
{pattern: 'js/utils/**/*.js'},
{pattern: 'js/views/**/*.js'},
{pattern: 'common/js/**/*.js'}
{pattern: 'coffee/src/**/!(*spec).js'},
{pattern: 'common/js/**/!(*spec).js'},
{pattern: 'js/**/!(*spec).js'}
],
specFiles: [
{pattern: 'coffee/spec/**/*.js'},
{pattern: 'js/spec/**/*.js'}
{pattern: 'coffee/spec/**/*spec.js'},
{pattern: 'js/spec/**/*spec.js'}
],
fixtureFiles: [
{pattern: 'coffee/fixtures/**/*.*'},
{pattern: 'templates/**/*.*'},
{pattern: 'common/templates/**/*.*'}
{pattern: 'common/templates/**/*.*'},
{pattern: 'templates/**/*.*'}
],
runFiles: [
......
......@@ -9,49 +9,52 @@ var path = require('path');
var configModule = require(path.join(__dirname, 'common_static/common/js/karma.common.conf.js'));
var files = {
libraryFiles: [
{pattern: 'common_static/js/vendor/jquery.min.js', included: true},
{pattern: 'common_static/js/test/i18n.js', included: true},
{pattern: 'common_static/coffee/src/ajax_prefix.js', included: true},
{pattern: 'common_static/js/src/logger.js', included: true},
{pattern: 'common_static/js/vendor/jasmine-imagediff.js', included: true},
{pattern: 'common_static/js/libs/jasmine-waituntil.js', included: true},
{pattern: 'common_static/js/libs/jasmine-extensions.js', included: true},
libraryFilesToInclude: [
{pattern: 'common_static/js/vendor/requirejs/require.js', included: true},
{pattern: 'RequireJS-namespace-undefine.js', included: true},
{pattern: 'common_static/js/vendor/jquery-ui.min.js', included: true},
{pattern: 'common_static/js/vendor/jquery.ui.draggable.js', included: true},
{pattern: 'common_static/js/vendor/jquery.cookie.js', included: true},
{pattern: 'common_static/js/vendor/json2.js', included: true},
{pattern: 'spec/main_requirejs.js', included: true},
{pattern: 'common_static/coffee/src/ajax_prefix.js', included: true},
{pattern: 'common_static/common/js/vendor/underscore.js', included: true},
{pattern: 'common_static/common/js/vendor/backbone.js', included: true},
{pattern: 'common_static/js/vendor/jquery.leanModal.js', included: true},
{pattern: 'common_static/edx-ui-toolkit/js/utils/global-loader.js', included: true},
{pattern: 'common_static/js/vendor/CodeMirror/codemirror.js', included: true},
{pattern: 'common_static/js/vendor/draggabilly.js'},
{pattern: 'common_static/js/vendor/jquery.min.js', included: true},
{pattern: 'common_static/js/vendor/jquery.cookie.js', included: true},
{pattern: 'common_static/js/vendor/jquery.leanModal.js', included: true},
{pattern: 'common_static/js/vendor/jquery.timeago.js', included: true},
{pattern: 'common_static/js/vendor/jquery-ui.min.js', included: true},
{pattern: 'common_static/js/vendor/jquery.ui.draggable.js', included: true},
{pattern: 'common_static/js/vendor/json2.js', included: true},
{pattern: 'common_static/js/vendor/moment.min.js', included: true},
{pattern: 'common_static/js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js', included: true},
{pattern: 'common_static/js/vendor/tinymce/js/tinymce/tinymce.full.min.js', included: true},
{pattern: 'common_static/js/vendor/jquery.timeago.js', included: true},
{pattern: 'common_static/js/vendor/sinon-1.17.0.js', included: true},
{pattern: 'common_static/js/test/add_ajax_prefix.js', included: true},
{pattern: 'common_static/js/src/accessibility_tools.js', included: true},
{pattern: 'common_static/js/src/logger.js', included: true},
{pattern: 'common_static/js/src/utility.js', included: true},
{pattern: 'common_static/js/test/add_ajax_prefix.js', included: true},
{pattern: 'common_static/js/test/i18n.js', included: true},
{pattern: 'public/js/split_test_staff.js', included: true},
{pattern: 'common_static/js/src/accessibility_tools.js', included: true},
{pattern: 'common_static/js/vendor/moment.min.js', included: true},
{pattern: 'spec/main_requirejs.js', included: true},
{pattern: 'src/word_cloud/d3.min.js', included: true},
{pattern: 'common_static/js/vendor/draggabilly.js'},
{pattern: 'common_static/edx-ui-toolkit/js/utils/global-loader.js', included: true},
{pattern: 'common_static/edx-pattern-library/js/modernizr-custom.js'},
{pattern: 'common_static/edx-pattern-library/js/afontgarde.js'},
{pattern: 'common_static/edx-pattern-library/js/edx-icons.js'}
{pattern: 'common_static/js/vendor/jasmine-imagediff.js', included: true},
{pattern: 'common_static/js/libs/jasmine-waituntil.js', included: true},
{pattern: 'common_static/js/libs/jasmine-extensions.js', included: true},
{pattern: 'common_static/js/vendor/sinon-1.17.0.js', included: true}
],
libraryFiles: [
{pattern: 'common_static/edx-pattern-library/js/**/*.js'}
],
sourceFiles: [
{pattern: 'src/xmodule.js', included: true, ignoreCoverage: true},
{pattern: 'src/xmodule.js', included: true, ignoreCoverage: true}, // To prevent getting instrumented twice.
{pattern: 'src/**/*.js', included: true}
],
specFiles: [
{pattern: 'spec/helper.js', included: true, ignoreCoverage: true},
{pattern: 'spec/helper.js', included: true, ignoreCoverage: true}, // Helper which depends on source files.
{pattern: 'spec/**/*.js', included: true}
],
......
......@@ -178,7 +178,6 @@ var setDefaults = function (files) {
};
var getBaseConfig = function (config, useRequireJs) {
useRequireJs = useRequireJs === undefined ? true : useRequireJs;
var getFrameworkFiles = function () {
var files = [
......@@ -292,11 +291,12 @@ var getBaseConfig = function (config, useRequireJs) {
};
var configure = function(data) {
var baseConfig = getBaseConfig(data.config, data.useRequireJs);
var useRequireJs = data.useRequireJs === undefined ? true : useRequireJs,
baseConfig = getBaseConfig(data.config, useRequireJs);
var files = _.flatten(
_.map(
['libraryFiles', 'sourceFiles', 'specFiles', 'fixtureFiles', 'runFiles'],
['libraryFilesToInclude', 'libraryFiles', 'sourceFiles', 'specFiles', 'fixtureFiles', 'runFiles'],
function(item) { return data.files[item] || []; }
)
);
......@@ -305,6 +305,10 @@ var configure = function(data) {
{pattern: path.join(appRoot, 'common/static/common/js/jasmine.common.conf.js'), included: true}
);
if (useRequireJs) {
files.unshift({pattern: 'common/js/utils/require-serial.js', included: true});
}
files = setDefaults(files);
// With nocache=true, Karma always serves the latest files from disk.
......
......@@ -8,28 +8,34 @@ var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
var files = {
libraryFiles: [
libraryFilesToInclude: [
{pattern: 'coffee/src/ajax_prefix.js', included: true},
{pattern: 'js/vendor/draggabilly.js', included: true},
{pattern: 'js/vendor/jquery.min.js', included: true},
{pattern: 'js/vendor/jasmine-imagediff.js', included: true},
{pattern: 'js/libs/jasmine-waituntil.js', included: true},
{pattern: 'js/libs/jasmine-extensions.js', included: true},
{pattern: 'coffee/src/jquery.immediateDescendents.js', included: true},
{pattern: 'js/vendor/jquery.leanModal.js', included: true},
{pattern: 'js/vendor/jquery.timeago.js', included: true},
{pattern: 'js/vendor/jquery.truncate.js', included: true},
{pattern: 'js/vendor/mustache.js', included: true},
{pattern: 'common/js/vendor/underscore.js', included: true},
{pattern: 'common/js/vendor/underscore.string.js', included: true},
{pattern: 'common/js/vendor/backbone.js', included: true},
{pattern: 'js/vendor/jquery.timeago.js', included: true},
{pattern: 'js/vendor/URI.min.js', included: true},
{pattern: 'coffee/src/ajax_prefix.js', included: true},
{pattern: 'js/test/add_ajax_prefix.js', included: true},
{pattern: 'js/test/i18n.js', included: true},
{pattern: 'coffee/src/jquery.immediateDescendents.js', included: true},
{pattern: 'js/vendor/jquery.leanModal.js', included: true},
{pattern: 'js/vendor/draggabilly.js', included: true},
{pattern: 'common/js/vendor/underscore.js', included: true},
{pattern: 'common/js/vendor/underscore.string.js', included: true},
{pattern: 'common/js/vendor/backbone.js', included: true},
{pattern: 'edx-ui-toolkit/js/utils/global-loader.js', included: true},
{pattern: 'edx-pattern-library/js/modernizr-custom.js', included: true},
{pattern: 'edx-pattern-library/js/afontgarde.js', included: true},
{pattern: 'edx-pattern-library/js/edx-icons.js', included: true}
{pattern: 'edx-pattern-library/js/edx-icons.js', included: true},
{pattern: 'js/vendor/jasmine-imagediff.js', included: true},
{pattern: 'js/libs/jasmine-waituntil.js', included: true},
{pattern: 'js/libs/jasmine-extensions.js', included: true}
],
libraryFiles: [
],
sourceFiles: [
......
......@@ -9,31 +9,22 @@ var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
var files = {
libraryFilesToInclude: [
{pattern: 'js/libs/jasmine-extensions.js', included: true}
],
libraryFiles: [
{pattern: 'js/vendor/jquery.min.js'},
{pattern: 'js/vendor/jasmine-imagediff.js'},
{pattern: 'js/libs/jasmine-stealth.js'},
{pattern: 'js/libs/jasmine-waituntil.js'},
{pattern: 'js/libs/jasmine-extensions.js'},
{pattern: 'js/vendor/jquery.simulate.js'},
{pattern: 'js/vendor/jquery.truncate.js'},
{pattern: 'common/js/vendor/underscore.js'},
{pattern: 'common/js/vendor/underscore.string.js'},
{pattern: 'common/js/vendor/backbone.js'},
{pattern: 'js/vendor/backbone.paginator.min.js'},
{pattern: 'js/vendor/jquery.timeago.js'},
{pattern: 'js/vendor/URI.min.js'},
{pattern: 'coffee/src/ajax_prefix.js'},
{pattern: 'js/test/add_ajax_prefix.js'},
{pattern: 'js/test/i18n.js'},
{pattern: 'coffee/src/jquery.immediateDescendents.js'},
{pattern: 'js/vendor/requirejs/text.js'},
{pattern: 'js/vendor/sinon-1.17.0.js'},
{pattern: 'common/js/utils/require-serial.js', included: true}
{pattern: 'coffee/src/**/*.js'},
{pattern: 'common/js/spec_helpers/**/*.js'},
{pattern: 'common/js/vendor/**/*.js'},
{pattern: 'js/libs/**/*.js'},
{pattern: 'js/test/**/*.js'},
{pattern: 'js/vendor/**/*.js'}
],
sourceFiles: [
{pattern: 'common/js/**/!(*spec).js'}
{pattern: 'common/js/components/**/!(*spec).js'},
{pattern: 'common/js/utils/**/!(*spec).js'}
],
specFiles: [
......
......@@ -4,9 +4,9 @@
baseUrl: '/base/',
paths: {
"moment": "xmodule_js/common_static/js/vendor/moment.min",
"modernizr": "xmodule_js/common_static/edx-pattern-library/js/modernizr-custom",
"afontgarde": "xmodule_js/common_static/edx-pattern-library/js/afontgarde",
"edxicons": "xmodule_js/common_static/edx-pattern-library/js/edx-icons",
"modernizr": "edx-pattern-library/js/modernizr-custom",
"afontgarde": "edx-pattern-library/js/afontgarde",
"edxicons": "edx-pattern-library/js/edx-icons",
"draggabilly": "xmodule_js/common_static/js/vendor/draggabilly"
},
"moment": {
......
......@@ -8,92 +8,47 @@ var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
var files = {
libraryFiles: [
{pattern: 'xmodule_js/common_static/js/test/i18n.js'},
{pattern: 'xmodule_js/common_static/coffee/src/ajax_prefix.js'},
{pattern: 'xmodule_js/common_static/js/src/logger.js'},
{pattern: 'xmodule_js/common_static/js/vendor/requirejs/require.js'},
{pattern: 'js/RequireJS-namespace-undefine.js'},
{pattern: 'xmodule_js/common_static/js/vendor/requirejs/text.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.min.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/jquery-ui.min.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.simulate.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.cookie.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.timeago.js'},
{pattern: 'xmodule_js/common_static/js/vendor/flot/jquery.flot.js'},
{pattern: 'xmodule_js/common_static/js/vendor/CodeMirror/codemirror.js'},
{pattern: 'xmodule_js/common_static/js/vendor/URI.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload.js'},
{pattern: 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.iframe-transport.js'},
{pattern: 'xmodule_js/common_static/js/vendor/url.min.js'},
{pattern: 'xmodule_js/common_static/coffee/src/jquery.immediateDescendents.js'},
{pattern: 'xmodule_js/common_static/js/xblock/**/*.js'},
{pattern: 'xmodule_js/common_static/coffee/src/xblock/**/*.js'},
{pattern: 'coffee/src/instructor_dashboard/**/*.js'},
{pattern: 'xmodule_js/common_static/js/vendor/sinon-1.17.0.js'},
{pattern: 'xmodule_js/src/capa/**/*.js'},
{pattern: 'xmodule_js/src/video/**/*.js'},
{pattern: 'xmodule_js/src/xmodule.js'},
{pattern: 'xmodule_js/common_static/js/src/**/*.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/underscore.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/underscore.string.js'},
{pattern: 'xmodule_js/common_static/common/js/vendor/backbone.js'},
{pattern: 'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/edxnotes/annotator-full.min.js'},
{pattern: 'xmodule_js/common_static/js/test/i18n.js'},
{pattern: 'xmodule_js/common_static/js/vendor/date.js'},
{pattern: 'xmodule_js/common_static/js/vendor/moment.min.js'},
{pattern: 'xmodule_js/common_static/js/vendor/moment-with-locales.min.js'},
{pattern: 'xmodule_js/common_static/common/js/utils/edx.utils.validate.js'},
libraryFilesToInclude: [
{pattern: 'xmodule_js/common_static/js/vendor/jquery.event.drag-2.2.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/slick.core.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/slick.grid.js', included: true},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-waituntil.js', included: true},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-extensions.js', included: true},
{pattern: 'common/js/utils/require-serial.js', included: true}
{pattern: 'xmodule_js/common_static/js/libs/jasmine-waituntil.js', included: true}
],
sourceFiles: [
{pattern: 'js/**/!(*spec).js'},
{pattern: 'coffee/src/**/*.js'},
libraryFiles: [
{pattern: 'common/js/**/*.js'},
{pattern: 'edx-pattern-library/js/**/*.js'},
{pattern: 'edx-ui-toolkit/js/**/*.js'},
{pattern: 'js/RequireJS-namespace-undefine.js'},
{pattern: 'xmodule_js/common_static/coffee/src/**/*.js'},
{pattern: 'xmodule_js/common_static/common/js/**/*.js'},
{pattern: 'xmodule_js/common_static/js/**/*.js'},
{pattern: 'xmodule_js/src/capa/*.js'},
{pattern: 'xmodule_js/src/video/*.js'},
{pattern: 'xmodule_js/src/xmodule.js'}
],
sourceFiles: [
{pattern: 'coffee/src/**/!(*spec).js'},
{pattern: 'js/**/!(*spec).js'},
{pattern: 'support/js/**/!(*spec).js'},
{pattern: 'teams/js/**/!(*spec).js'},
{pattern: 'xmodule_js/common_static/coffee/**/*.js'}
{pattern: 'xmodule_js/common_static/coffee/**/!(*spec).js'},
],
specFiles: [
{pattern: 'js/spec/**/*spec.js'},
{pattern: 'teams/js/spec/**/*spec.js'},
{pattern: 'support/js/spec/**/*spec.js'}
{pattern: 'support/js/spec/**/*spec.js'},
{pattern: 'teams/js/spec/**/*spec.js'}
],
fixtureFiles: [
{pattern: 'js/fixtures/**/*.html'},
{pattern: 'templates/instructor/instructor_dashboard_2/**/*.*'},
{pattern: 'templates/dashboard/**/*.*'},
{pattern: 'templates/edxnotes/**/*.*'},
{pattern: 'templates/fields/**/*.*'},
{pattern: 'templates/student_account/**/*.*'},
{pattern: 'templates/student_profile/**/*.*'},
{pattern: 'templates/verify_student/**/*.*'},
{pattern: 'templates/file-upload.underscore'},
{pattern: 'templates/components/header/**/*.*'},
{pattern: 'templates/components/tabbed/**/*.*'},
{pattern: 'templates/components/card/**/*.*'},
{pattern: 'templates/financial-assistance/**/*.*'},
{pattern: 'templates/search/**/*.*'},
{pattern: 'templates/discovery/**/*.*'},
{pattern: 'common/templates/**/*.*'},
{pattern: 'teams/templates/**/*.*'},
{pattern: 'support/templates/**/*.*'},
{pattern: 'templates/bookmarks/**/*.*'},
{pattern: 'templates/learner_dashboard/**/*.*'},
{pattern: 'templates/ccx/**/*.*'},
{pattern: 'templates/commerce/receipt.underscore'},
{pattern: 'templates/api_admin/**/*.*', included: false}
{pattern: 'teams/templates/**/*.*'},
{pattern: 'templates/**/*.*'}
],
runFiles: [
......
......@@ -9,40 +9,44 @@ var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
var files = {
libraryFiles: [
{pattern: 'xmodule_js/common_static/js/vendor/jquery.min.js', included: true},
{pattern: 'xmodule_js/common_static/js/test/i18n.js', included: true},
{pattern: 'xmodule_js/common_static/coffee/src/ajax_prefix.js', included: true},
{pattern: 'xmodule_js/common_static/js/src/logger.js', included: true},
{pattern: 'xmodule_js/common_static/common/js/vendor/underscore.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/jasmine-imagediff.js', included: true},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-extensions.js', included: true},
libraryFilesToInclude: [
{pattern: 'xmodule_js/common_static/js/vendor/requirejs/require.js', included: true},
{pattern: 'js/spec/main_requirejs_coffee.js', included: true},
{pattern: 'js/RequireJS-namespace-undefine.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/jquery-ui.min.js', included: true},
{pattern: 'xmodule_js/common_static/coffee/src/ajax_prefix.js', included: true},
{pattern: 'xmodule_js/common_static/common/js/vendor/underscore.js', included: true},
{pattern: 'xmodule_js/common_static/edx-ui-toolkit/js/utils/global-loader.js', included: true},
{pattern: 'xmodule_js/common_static/js/src/logger.js', included: true},
{pattern: 'xmodule_js/common_static/js/test/i18n.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/CodeMirror/codemirror.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.min.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/jquery.cookie.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/flot/jquery.flot.js', included: true},
{pattern: 'xmodule_js/common_static/coffee/src/jquery.immediateDescendents.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/jquery-ui.min.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/moment.min.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/moment-with-locales.min.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/CodeMirror/codemirror.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/URI.min.js', included: true},
{pattern: 'xmodule_js/common_static/coffee/src/jquery.immediateDescendents.js', included: true},
{pattern: 'xmodule_js/common_static/js/xblock/*.js', included: true},
{pattern: 'xmodule_js/common_static/coffee/src/xblock/*.js', included: true},
{pattern: 'moment_requirejs.js', included: true},
{pattern: 'xmodule_js/src/capa/*.js', included: true},
{pattern: 'xmodule_js/src/video/*.js', included: true},
{pattern: 'xmodule_js/src/xmodule.js', included: true},
{pattern: 'xmodule_js/common_static/js/vendor/draggabilly.js'},
{pattern: 'xmodule_js/common_static/edx-ui-toolkit/js/utils/global-loader.js', included: true},
{pattern: 'xmodule_js/common_static/edx-pattern-library/js/modernizr-custom.js'},
{pattern: 'xmodule_js/common_static/edx-pattern-library/js/afontgarde.js'},
{pattern: 'xmodule_js/common_static/edx-pattern-library/js/edx-icons.js'}
{pattern: 'xmodule_js/common_static/js/vendor/jasmine-imagediff.js', included: true},
{pattern: 'xmodule_js/common_static/js/libs/jasmine-extensions.js', included: true}
],
libraryFiles: [
{pattern: 'edx-pattern-library/js/**/*.js'},
{pattern: 'edx-ui-toolkit/js/**/*.js'},
{pattern: 'xmodule_js/common_static/js/vendor/**/*.js'}
],
sourceFiles: [
{pattern: 'coffee/src/**/*.js', included: true}
{pattern: 'coffee/src/**/*.js', included: true},
],
specFiles: [
......
(function(requirejs) {
'use strict';
requirejs.config({
paths: {
"moment": "/base/xmodule_js/common_static/js/vendor/moment.min"
},
shim:{
"moment": {
exports: "moment"
}
}
});
}).call(this, RequireJS.requirejs);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment