Create DeferredContent.spec.js

pull/2305/head
Tuğçe Küçükoğlu 2022-03-10 13:39:10 +03:00 committed by Tuğçe Küçükoğlu
parent 07fcb3db01
commit ebc0609501
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import { mount } from '@vue/test-utils';
import DeferredContent from './DeferredContent.vue';
describe('DeferredContent', () => {
it('should exist', async () => {
const wrapper = mount(DeferredContent, {
slots: {
default: '<img src="demo/images/nature/nature4.jpg" alt="Nature"/>'
}
});
await wrapper.setData({ loaded: true });
expect(wrapper.find('img').exists()).toBe(true);
});
});