issuable_context_spec review changes
This commit is contained in:
parent
baa08b5657
commit
68269d7a40
|
|
@ -5,6 +5,10 @@ describe('IssuableContext', () => {
|
|||
describe('toggleHiddenParticipants', () => {
|
||||
const event = jasmine.createSpyObj('event', ['preventDefault']);
|
||||
|
||||
afterEach(() => {
|
||||
gl.lazyLoader = undefined;
|
||||
});
|
||||
|
||||
it('calls loadCheck if lazyLoader is set', () => {
|
||||
gl.lazyLoader = jasmine.createSpyObj('lazyLoader', ['loadCheck']);
|
||||
|
||||
|
|
@ -13,16 +17,12 @@ describe('IssuableContext', () => {
|
|||
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;
|
||||
|
||||
const toggle = IssuableContext.prototype.toggleHiddenParticipants.bind(null, event);
|
||||
|
||||
expect(toggle).not.toThrow();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
gl.lazyLoader = undefined;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue