Finish issuable_context_spec

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册