Fixed running tests with karma.
This commit is contained in:
parent
f9ee100e73
commit
b686a7f4a1
3 changed files with 6 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
||||||
// Helper for running tests through Karma.
|
// Helper for running tests through Karma.
|
||||||
// Hooks into the test view logic for running tests.
|
// Hooks into the test view logic for running tests.
|
||||||
|
|
||||||
|
|
||||||
|
window.userObject = {_id:'1'}
|
||||||
initialize = require('core/initialize');
|
initialize = require('core/initialize');
|
||||||
initialize.init();
|
initialize.init();
|
||||||
console.debug = function() {}; // Karma conf doesn't seem to work? Debug messages are still emitted when they shouldn't be.
|
console.debug = function() {}; // Karma conf doesn't seem to work? Debug messages are still emitted when they shouldn't be.
|
||||||
|
|
|
@ -43,6 +43,8 @@ init = ->
|
||||||
handleNormalUrls()
|
handleNormalUrls()
|
||||||
setUpMoment() # Set up i18n for moment
|
setUpMoment() # Set up i18n for moment
|
||||||
|
|
||||||
|
module.exports.init = init
|
||||||
|
|
||||||
handleNormalUrls = ->
|
handleNormalUrls = ->
|
||||||
# http://artsy.github.com/blog/2012/06/25/replacing-hashbang-routes-with-pushstate/
|
# http://artsy.github.com/blog/2012/06/25/replacing-hashbang-routes-with-pushstate/
|
||||||
$(document).on 'click', "a[href^='/']", (event) ->
|
$(document).on 'click', "a[href^='/']", (event) ->
|
||||||
|
|
|
@ -9,6 +9,7 @@ module.exports = function(config) {
|
||||||
|
|
||||||
// list of files / patterns to load in the browser
|
// list of files / patterns to load in the browser
|
||||||
files : [
|
files : [
|
||||||
|
'public/javascripts/vendor.js', // need for jade definition...
|
||||||
'public/javascripts/whole-vendor.js',
|
'public/javascripts/whole-vendor.js',
|
||||||
'public/lib/ace/ace.js',
|
'public/lib/ace/ace.js',
|
||||||
'public/javascripts/aether.js',
|
'public/javascripts/aether.js',
|
||||||
|
|
Reference in a new issue