Skip to content
Snippets Groups Projects

Consolidate user avatar Vue logic

Merged username-removed-408230 requested to merge user-avatar-vue-ce into master
All threads resolved!
1 file
+ 6
11
Compare changes
  • Side-by-side
  • Inline
/* eslint-disable no-restricted-syntax */
import Vue from 'vue';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link';
describe('User Avatar Link Component', function () {
describe('Initialization', function () {
beforeEach(function () {
const propsData = this.propsData = {
this.propsData = {
href: 'myavatarurl.com',
imgSize: 99,
imgSrc: 'myavatarurl.com',
@@ -16,12 +14,12 @@ describe('User Avatar Link Component', function () {
};
this.vueInstance = new Vue({
data: propsData,
data: this.propsData,
components: {
'user-avatar-link': UserAvatarLink,
},
template: `
<user-avatar-link
<user-avatar-link
:href="href"
:img-size="imgSize"
:img-src="imgSrc"
@@ -63,12 +61,9 @@ describe('User Avatar Link Component', function () {
expect(componentImgTag).toContain('<img');
});
it('should return neccessary props as defined', function (done) {
Vue.nextTick(() => {
_.each(this.propsData, (val, key) => {
expect(this.userAvatarLinkComponent[key]).toBeDefined();
});
done();
it('should return neccessary props as defined', function () {
_.each(this.propsData, (val, key) => {
expect(this.userAvatarLinkComponent[key]).toBeDefined();
});
});
});
Loading