issuable_context_spec review changes

上级 baa08b56
...@@ -5,6 +5,10 @@ describe('IssuableContext', () => { ...@@ -5,6 +5,10 @@ describe('IssuableContext', () => {
describe('toggleHiddenParticipants', () => { describe('toggleHiddenParticipants', () => {
const event = jasmine.createSpyObj('event', ['preventDefault']); const event = jasmine.createSpyObj('event', ['preventDefault']);
afterEach(() => {
gl.lazyLoader = undefined;
});
it('calls loadCheck if lazyLoader is set', () => { it('calls loadCheck if lazyLoader is set', () => {
gl.lazyLoader = jasmine.createSpyObj('lazyLoader', ['loadCheck']); gl.lazyLoader = jasmine.createSpyObj('lazyLoader', ['loadCheck']);
...@@ -13,16 +17,12 @@ describe('IssuableContext', () => { ...@@ -13,16 +17,12 @@ describe('IssuableContext', () => {
expect(gl.lazyLoader.loadCheck).toHaveBeenCalled(); expect(gl.lazyLoader.loadCheck).toHaveBeenCalled();
}); });
it('does not throw if lazyLoader is not set', () => { it('does not throw if lazyLoader is not defined', () => {
gl.lazyLoader = undefined; gl.lazyLoader = undefined;
const toggle = IssuableContext.prototype.toggleHiddenParticipants.bind(null, event); const toggle = IssuableContext.prototype.toggleHiddenParticipants.bind(null, event);
expect(toggle).not.toThrow(); expect(toggle).not.toThrow();
}); });
afterEach(() => {
gl.lazyLoader = undefined;
});
}); });
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册