瀏覽代碼

Fix emit errors

Tobias Skarhed 7 年之前
父節點
當前提交
766c23a1eb
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      public/app/plugins/panel/graph/specs/graph_ctrl.jest.ts

+ 3 - 0
public/app/plugins/panel/graph/specs/graph_ctrl.jest.ts

@@ -34,6 +34,9 @@ describe('GraphCtrl', () => {
 
   beforeEach(() => {
     ctx.ctrl = new GraphCtrl(scope, injector, {});
+    ctx.ctrl.events = {
+      emit: () => {},
+    };
     ctx.ctrl.annotationsPromise = Promise.resolve({});
     ctx.ctrl.updateTimeRange();
   });