Move annotationComponent() into scope

Move the annotationComponent() function into the describe() scope nearer
to where it's actually used. This puts the code nearer to where it's
used and is going to be useful in the next commit when it's going to be
changed to make use of one of the fake variables in that scope.
parent 5d62b7cf
......@@ -29,20 +29,6 @@ var groupFixtures = {
},
};
/**
* Returns the annotation directive with helpers stubbed out.
*/
function annotationComponent() {
var noop = function () { return ''; };
return proxyquire('../annotation', {
angular: testUtil.noCallThru(angular),
'../util/account-id': {
username: noop,
},
});
}
/**
* Returns the controller for the action button with the given `label`.
*
......@@ -116,6 +102,20 @@ describe('annotation', function() {
var fakeStreamer;
var sandbox;
/**
* Returns the annotation directive with helpers stubbed out.
*/
function annotationComponent() {
var noop = function () { return ''; };
return proxyquire('../annotation', {
angular: testUtil.noCallThru(angular),
'../util/account-id': {
username: noop,
},
});
}
function createDirective(annotation) {
annotation = annotation || fixtures.defaultAnnotation();
var element = util.createDirective(document, 'annotation', {
......
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