[Topic] Catch errors from listeners

This commit is contained in:
Victor Woeltjen
2015-11-09 16:55:22 -08:00
parent acdd9622d2
commit e3e44f74d6
3 changed files with 16 additions and 4 deletions

View File

@@ -28,13 +28,18 @@ define(
describe("The 'topic' service", function () {
var topic,
mockLog,
testMessage,
mockCallback;
beforeEach(function () {
testMessage = { someKey: "some value"};
mockLog = jasmine.createSpyObj(
'$log',
[ 'error', 'warn', 'info', 'debug' ]
);
mockCallback = jasmine.createSpy('callback');
topic = new Topic();
topic = new Topic(mockLog);
});
it("notifies listeners on a topic", function () {