Fix syntax error in selectors .attr() now returns a string (though it can still be passed an integer) Fixes checkbox test failures Remove remaining references to jquery.min (in wrong folder) $.ajax now returns 422 if type is json and body is not JSON, e.g. '' Substitute prop for attr Remove references to jquery.min, add jquery.migrate (again) "Fix" jquery karma config This wasn't suppoed to survive the merge This throws an error when called with an 'undefined' error Fix Karma warning about [re|un]loading the window Fix path for jquery in cms-squire tests Move jasmine.clock.uninstall() to afterEach so it runs even on failure Fix test failing due to timezone issues Do the timeout before the window scrolling (so handler will not be _.throttled) Fix an alert() triggered by window.onBeforeUnload while testing in Chrome
47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
// Karma config for cms suite.
|
|
// Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js
|
|
|
|
/* jshint node: true */
|
|
/*jshint -W079 */
|
|
'use strict';
|
|
var path = require('path');
|
|
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
|
|
|
|
var options = {
|
|
|
|
includeCommonFiles: true,
|
|
|
|
libraryFiles: [],
|
|
|
|
libraryFilesToInclude: [
|
|
{pattern: 'common/js/vendor/jquery.js', included: true},
|
|
{pattern: 'common/js/vendor/jquery-migrate.js', included: true}
|
|
],
|
|
|
|
// 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: 'coffee/src/**/!(*spec).js'},
|
|
{pattern: 'js/**/!(*spec|djangojs).js'}
|
|
],
|
|
|
|
specFiles: [
|
|
{pattern: 'coffee/spec/**/*spec.js'},
|
|
{pattern: 'js/certificates/spec/**/*spec.js'},
|
|
{pattern: 'js/spec/**/*spec.js'}
|
|
],
|
|
|
|
fixtureFiles: [
|
|
{pattern: 'coffee/fixtures/**/*.underscore'},
|
|
{pattern: 'templates/**/*.underscore'}
|
|
],
|
|
|
|
runFiles: [
|
|
{pattern: 'coffee/spec/main.js', included: true}
|
|
]
|
|
};
|
|
|
|
module.exports = function (config) {
|
|
configModule.configure(config, options);
|
|
};
|