Commit 2f5018e6 by David Ormsbee

Try absolute paths.

parent da43f63c
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
'use strict'; 'use strict';
var path = require('path'); var path = require('path');
var configModule = require(path.join(__dirname, '../common/js/karma.common.conf.js')); var configModule = require(path.join(__dirname, '../../../../../common/static/common/js/karma.common.conf.js'));
var options = { var options = {
...@@ -18,72 +18,72 @@ var options = { ...@@ -18,72 +18,72 @@ var options = {
// Avoid adding files to this list. Use RequireJS. // Avoid adding files to this list. Use RequireJS.
libraryFilesToInclude: [ libraryFilesToInclude: [
// Load the core JavaScript dependencies // Load the core JavaScript dependencies
{pattern: '../../../../static/coffee/src/ajax_prefix.js', included: true}, {pattern: 'common/static/coffee/src/ajax_prefix.js', included: true},
{pattern: '../../../../static/common/js/vendor/underscore.js', included: true}, {pattern: 'common/static/common/js/vendor/underscore.js', included: true},
{pattern: '../../../../static/common/js/vendor/backbone.js', included: true}, {pattern: 'common/static/common/js/vendor/backbone.js', included: true},
{pattern: '../../../../static/js/vendor/CodeMirror/codemirror.js', included: true}, {pattern: 'common/static/js/vendor/CodeMirror/codemirror.js', included: true},
{pattern: '../../../../static/js/vendor/draggabilly.js'}, {pattern: 'common/static/js/vendor/draggabilly.js'},
{pattern: '../../../../static/common/js/vendor/jquery.js', included: true}, {pattern: 'common/static/common/js/vendor/jquery.js', included: true},
{pattern: '../../../../static/common/js/vendor/jquery-migrate.js', included: true}, {pattern: 'common/static/common/js/vendor/jquery-migrate.js', included: true},
{pattern: '../../../../static/js/vendor/jquery.cookie.js', included: true}, {pattern: 'common/static/js/vendor/jquery.cookie.js', included: true},
{pattern: '../../../../static/js/vendor/jquery.leanModal.js', included: true}, {pattern: 'common/static/js/vendor/jquery.leanModal.js', included: true},
{pattern: '../../../../static/js/vendor/jquery.timeago.js', included: true}, {pattern: 'common/static/js/vendor/jquery.timeago.js', included: true},
{pattern: '../../../../static/js/vendor/jquery-ui.min.js', included: true}, {pattern: 'common/static/js/vendor/jquery-ui.min.js', included: true},
{pattern: '../../../../static/js/vendor/jquery.ui.draggable.js', included: true}, {pattern: 'common/static/js/vendor/jquery.ui.draggable.js', included: true},
{pattern: '../../../../static/js/vendor/json2.js', included: true}, {pattern: 'common/static/js/vendor/json2.js', included: true},
{pattern: '../../../../static/common/js/vendor/moment-with-locales.js', included: true}, {pattern: 'common/static/common/js/vendor/moment-with-locales.js', included: true},
{pattern: '../../../../static/js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js', included: true}, {pattern: 'common/static/js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js', included: true},
{pattern: '../../../../static/js/vendor/tinymce/js/tinymce/tinymce.full.min.js', included: true}, {pattern: 'common/static/js/vendor/tinymce/js/tinymce/tinymce.full.min.js', included: true},
{pattern: '../../../../static/js/src/accessibility_tools.js', included: true}, {pattern: 'common/static/js/src/accessibility_tools.js', included: true},
{pattern: '../../../../static/js/src/logger.js', included: true}, {pattern: 'common/static/js/src/logger.js', included: true},
{pattern: '../../../../static/js/src/utility.js', included: true}, {pattern: 'common/static/js/src/utility.js', included: true},
{pattern: '../../../../static/js/test/add_ajax_prefix.js', included: true}, {pattern: 'common/static/js/test/add_ajax_prefix.js', included: true},
{pattern: '../../../../static/js/test/i18n.js', included: true}, {pattern: 'common/static/js/test/i18n.js', included: true},
{pattern: '../../../../static/common/js/vendor/hls.js', included: true}, {pattern: 'common/static/common/js/vendor/hls.js', included: true},
{pattern: 'public/js/split_test_staff.js', included: true}, {pattern: 'common/lib/xmodule/xmodule/assets/split_test/public/js/split_test_staff.js', included: true},
{pattern: 'src/word_cloud/d3.min.js', included: true}, {pattern: 'common/lib/xmodule/xmodule/assets/word_cloud/public/js/d3.min.js', included: true},
// Load test utilities // Load test utilities
{pattern: '../../../../js/vendor/jasmine-imagediff.js', included: true}, {pattern: 'common/static/js/vendor/jasmine-imagediff.js', included: true},
{pattern: '../../../../common/js/spec_helpers/jasmine-waituntil.js', included: true}, {pattern: 'common/static/common/js/spec_helpers/jasmine-waituntil.js', included: true},
{pattern: '../../../../common/js/spec_helpers/jasmine-extensions.js', included: true}, {pattern: 'common/static/common/js/spec_helpers/jasmine-extensions.js', included: true},
{pattern: '../../../../common/js/vendor/sinon.js', included: true}, {pattern: 'common/static/common/js/vendor/sinon.js', included: true},
// Load the edX global namespace before RequireJS is installed // Load the edX global namespace before RequireJS is installed
{pattern: '../edx-ui-toolkit/js/utils/global-loader.js', included: true}, {pattern: 'common/static/edx-ui-toolkit/js/utils/global-loader.js', included: true},
{pattern: '../edx-ui-toolkit/js/utils/string-utils.js', included: true}, {pattern: 'common/static/edx-ui-toolkit/js/utils/string-utils.js', included: true},
{pattern: '../edx-ui-toolkit/js/utils/html-utils.js', included: true}, {pattern: 'common/static/edx-ui-toolkit/js/utils/html-utils.js', included: true},
// Load RequireJS and move it into the RequireJS namespace // Load RequireJS and move it into the RequireJS namespace
{pattern: '../common/js/vendor/require.js', included: true}, {pattern: 'common/static/common/js/vendor/require.js', included: true},
{pattern: 'RequireJS-namespace-undefine.js', included: true}, {pattern: 'common/lib/xmodule/xmodule/js/RequireJS-namespace-undefine.js', included: true},
{pattern: 'spec/main_requirejs.js', included: true} {pattern: 'common/lib/xmodule/xmodule/js/spec/main_requirejs.js', included: true}
], ],
libraryFiles: [ libraryFiles: [
{pattern: '../edx-pattern-library/js/**/*.js'}, {pattern: 'common/static/edx-pattern-library/js/**/*.js'},
{pattern: '../edx-ui-toolkit/js/**/*.js'} {pattern: 'common/static/edx-ui-toolkit/js/**/*.js'}
], ],
// Make sure the patterns in sourceFiles and specFiles do not match the same file. // 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. // Otherwise Istanbul which is used for coverage tracking will cause tests to not run.
sourceFiles: [ sourceFiles: [
{pattern: 'src/xmodule.js', included: true, ignoreCoverage: true}, // To prevent getting instrumented twice. {pattern: 'common/lib/xmodule/xmodule/js/src/xmodule.js', included: true, ignoreCoverage: true}, // To prevent getting instrumented twice.
{pattern: 'src/**/*.js', included: true} {pattern: 'common/lib/xmodule/xmodule/js/src/**/*.js', included: true}
], ],
specFiles: [ specFiles: [
{pattern: 'spec/helper.js', included: true, ignoreCoverage: true}, // Helper which depends on source files. {pattern: 'common/lib/xmodule/xmodule/js/spec/helper.js', included: true, ignoreCoverage: true}, // Helper which depends on source files.
{pattern: 'spec/**/*.js', included: true} {pattern: 'common/lib/xmodule/xmodule/js/spec/**/*.js', included: true}
], ],
fixtureFiles: [ fixtureFiles: [
{pattern: 'fixtures/*.*'}, {pattern: 'common/lib/xmodule/xmodule/js/fixtures/*.*'},
{pattern: 'fixtures/hls/**/*.*'} {pattern: 'common/lib/xmodule/xmodule/js/fixtures/hls/**/*.*'}
], ],
runFiles: [ runFiles: [
{pattern: 'karma_runner.js', included: true} {pattern: 'common/lib/xmodule/xmodule/js/karma_runner.js', included: true}
] ]
}; };
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
// Time waitsFor() should wait for before failing a test. // Time waitsFor() should wait for before failing a test.
window.WAIT_TIMEOUT = 5000; window.WAIT_TIMEOUT = 5000;
jasmine.getFixtures().fixturesPath += 'fixtures'; jasmine.getFixtures().fixturesPath += 'common/lib/xmodule/xmodule/js/fixtures';
jasmine.stubbedMetadata = { jasmine.stubbedMetadata = {
'7tqY6eQzVhE': { '7tqY6eQzVhE': {
......
...@@ -34,10 +34,10 @@ ...@@ -34,10 +34,10 @@
requirejs.config({ requirejs.config({
baseUrl: '/base/', baseUrl: '/base/',
paths: { paths: {
moment: '../common/js/vendor/moment-with-locales', 'moment': 'common/static/common/js/vendor/moment-with-locales',
draggabilly: '../js/vendor/draggabilly', 'draggabilly': 'common/static/js/vendor/draggabilly',
'edx-ui-toolkit': '../edx-ui-toolkit', 'edx-ui-toolkit': 'common/static/edx-ui-toolkit',
hls: '../common/js/vendor/hls' 'hls': 'common/static/common/js/vendor/hls'
}, },
shim: { shim: {
moment: { moment: {
......
...@@ -290,7 +290,7 @@ function getBaseConfig(config, useRequireJs) { ...@@ -290,7 +290,7 @@ function getBaseConfig(config, useRequireJs) {
return { return {
// base path that will be used to resolve all patterns (eg. files, exclude) // base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '', basePath: appRoot,
// frameworks to use // frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
......
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