Fixed running tests with karma.

This commit is contained in:
Scott Erickson 2015-02-05 13:58:07 -08:00
parent f9ee100e73
commit b686a7f4a1
3 changed files with 6 additions and 1 deletions

View file

@ -1,8 +1,10 @@
// Helper for running tests through Karma.
// Hooks into the test view logic for running tests.
window.userObject = {_id:'1'}
initialize = require('core/initialize');
initialize.init();
console.debug = function() {}; // Karma conf doesn't seem to work? Debug messages are still emitted when they shouldn't be.
TestView = require('views/TestView');
TestView.runTests();
TestView.runTests();

View file

@ -43,6 +43,8 @@ init = ->
handleNormalUrls()
setUpMoment() # Set up i18n for moment
module.exports.init = init
handleNormalUrls = ->
# http://artsy.github.com/blog/2012/06/25/replacing-hashbang-routes-with-pushstate/
$(document).on 'click', "a[href^='/']", (event) ->

View file

@ -9,6 +9,7 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files : [
'public/javascripts/vendor.js', // need for jade definition...
'public/javascripts/whole-vendor.js',
'public/lib/ace/ace.js',
'public/javascripts/aether.js',