Commit baa08b56 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Finish issuable_context_spec

parent 06903810
/* global IssuableContext */
import '~/issuable_context';
fdescribe('IssuableContext', () => {
describe('IssuableContext', () => {
describe('toggleHiddenParticipants', () => {
beforeEach(() => {
const event = jasmine.createSpyObj('event', ['preventDefault']);
});
fit('calls loadCheck if lazyLoader is set', () => {
it('calls loadCheck if lazyLoader is set', () => {
gl.lazyLoader = jasmine.createSpyObj('lazyLoader', ['loadCheck']);
const event = {};
IssuableContext.prototype.toggleHiddenParticipants(event);
expect(gl.lazyLoader.loadCheck).toHaveBeenCalled();
});
it('does not call loadCheck if lazyLoader is not set', () => {
it('does not throw if lazyLoader is not set', () => {
gl.lazyLoader = undefined;
const event = {};
IssuableContext.prototype.toggleHiddenParticipants(event);
const toggle = IssuableContext.prototype.toggleHiddenParticipants.bind(null, event);
expect(gl.lazyLoader.loadCheck).not.toHaveBeenCalled();
expect(toggle).not.toThrow();
});
afterEach(() => {
......
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