I have a directive that $emit's an event, but in the parent scope of a unit test doesn't get the event.
test $broadcasts an event to the directive, directive gets the event, and then directives $emits its own event, that the parent should get.
unit test:
beforeEach(inject(function ($compile, $rootScope) {
scope = $rootScope.$new();
compile = $compile;
}));
element = compile(angular.element('<div myDirective></div>'))(scope);
scope.$digest();
var _scope = element.isolateScope();
scope.$broadcast('directive-change');
scope.$on('directive-successfully-changed', function (e) {});
directive:
scope.$on('directive-change', function (e) {
scope.$emit('directive-successfully-changed');
});