Cover linkClicked in repo_file

上级 d0bcf017
......@@ -119,4 +119,18 @@ describe('RepoFile', () => {
expect(vm.linkClicked).toHaveBeenCalledWith(file);
});
describe('methods', () => {
describe('linkClicked', () => {
const vm = jasmine.createSpyObj('vm', ['$emit']);
it('$emits linkclicked with file obj', () => {
const theFile = {};
repoFile.methods.linkClicked.call(vm, theFile);
expect(vm.$emit).toHaveBeenCalledWith('linkclicked', theFile);
});
});
});
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册