Commit 7d9ac533 authored by Aron Carroll's avatar Aron Carroll

Fix broken unit tests due to event API changes

parent b4b2eec5
......@@ -18,14 +18,6 @@ module.exports = function(config) {
'h/static/scripts/vendor/polyfills/bind.js',
'h/static/scripts/vendor/polyfills/url.js',
'h/static/scripts/vendor/jquery.js',
'h/static/scripts/vendor/angular.js',
'h/static/scripts/vendor/angular-mocks.js',
'h/static/scripts/vendor/angular-animate.js',
'h/static/scripts/vendor/angular-bootstrap.js',
'h/static/scripts/vendor/angular-resource.js',
'h/static/scripts/vendor/angular-route.js',
'h/static/scripts/vendor/angular-sanitize.js',
'h/static/scripts/vendor/ng-tags-input.js',
'h/static/scripts/vendor/jschannel.js',
'h/static/scripts/vendor/jwz.js',
'h/static/scripts/vendor/moment-with-langs.js',
......@@ -43,6 +35,16 @@ module.exports = function(config) {
'h/static/scripts/annotator/plugin/threading.js',
'h/static/scripts/vendor/dom_text_mapper.js',
'h/static/scripts/annotator/annotator.anchoring.js',
// Angular needs to be included after annotator to avoid the
// CrossFrame dependencies in Bridge picking up the angular object.
'h/static/scripts/vendor/angular.js',
'h/static/scripts/vendor/angular-mocks.js',
'h/static/scripts/vendor/angular-animate.js',
'h/static/scripts/vendor/angular-bootstrap.js',
'h/static/scripts/vendor/angular-resource.js',
'h/static/scripts/vendor/angular-route.js',
'h/static/scripts/vendor/angular-sanitize.js',
'h/static/scripts/vendor/ng-tags-input.js',
'h/static/scripts/app.js',
'h/static/scripts/account.js',
'h/static/scripts/helpers.js',
......
......@@ -30,7 +30,8 @@ describe 'AnnotationSync', ->
# TODO: Fix this hack to remove pre-existing bound listeners.
$rootScope.$$listeners = []
options =
on: sandbox.spy($rootScope.$on.bind($rootScope))
on: sandbox.spy (event, fn) ->
$rootScope.$on(event, (evt, args...) -> fn(args...))
emit: sandbox.spy($rootScope.$emit.bind($rootScope))
createAnnotationSync = ->
......
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