Commit 68269d7a authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

issuable_context_spec review changes

parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment