karma_lms_coffee.conf.js 3.18 KB
Newer Older
1
// Karma config for lms-coffee suite.
2
// Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js
3

4
/* eslint-env node */
5 6 7 8
'use strict';
var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));

9 10 11 12 13
var options = {

    useRequireJs: false,
    includeCommonFiles: true,

14
    // Avoid adding files to this list. Use RequireJS.
15
    libraryFilesToInclude: [
16 17
        {pattern: 'xmodule_js/common_static/js/vendor/requirejs/require.js', included: true},
        {pattern: 'js/RequireJS-namespace-undefine.js', included: true},
18 19 20 21 22 23 24 25 26

        {pattern: 'common/js/vendor/jquery.js', included: true},
        {pattern: 'common/js/vendor/jquery-migrate.js', included: true},
        {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/vendor/requirejs/require.js', included: true},

27
        {pattern: 'xmodule_js/common_static/coffee/src/ajax_prefix.js', included: true},
28 29
        {pattern: 'common/js/vendor/jquery.js', included: true},
        {pattern: 'common/js/vendor/jquery-migrate.js', included: true},
30
        {pattern: 'common/js/vendor/underscore.js', included: true},
31
        {pattern: 'common/js/xblock/*.js', included: true},
32 33
        {pattern: 'xmodule_js/common_static/js/src/logger.js', included: true},
        {pattern: 'xmodule_js/common_static/js/test/i18n.js', included: true},
34
        {pattern: 'xmodule_js/common_static/js/vendor/codemirror-compressed.js', included: true},
35 36
        {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},
37 38
        {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},
39
        {pattern: 'xmodule_js/common_static/js/vendor/URI.min.js', included: true},
40

41 42 43
        {pattern: 'xmodule_js/src/capa/*.js', included: true},
        {pattern: 'xmodule_js/src/video/*.js', included: true},
        {pattern: 'xmodule_js/src/xmodule.js', included: true},
44 45

        {pattern: 'xmodule_js/common_static/js/vendor/jasmine-imagediff.js', included: true},
46 47 48
        {pattern: 'common/js/spec_helpers/jasmine-extensions.js', included: true},

        {pattern: 'lms/js/spec/main_requirejs_coffee.js', included: true}
49 50 51 52
    ],

    libraryFiles: [
        {pattern: 'xmodule_js/common_static/js/vendor/**/*.js'}
53
    ],
54

55 56
    // 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.
57
    sourceFiles: [
58
        {pattern: 'coffee/src/**/*.js', included: true}
59
    ],
60

61
    specFiles: [
62
        {pattern: 'coffee/spec/**/*.js', included: true}
63
    ],
64

65
    fixtureFiles: [
66
        {pattern: 'coffee/fixtures/**/*.*', included: true}
67 68
    ]
};
69

70
module.exports = function(config) {
71
    configModule.configure(config, options);
72
};