2022-09-06 12:03:37 +00:00
|
|
|
import { mount } from '@vue/test-utils';
|
|
|
|
import DeferredContent from './DeferredContent.vue';
|
|
|
|
|
|
|
|
describe('DeferredContent', () => {
|
|
|
|
it('should exist', async () => {
|
|
|
|
const wrapper = mount(DeferredContent, {
|
|
|
|
slots: {
|
2022-12-09 07:52:51 +00:00
|
|
|
default: '<img src="/demo/images/nature/nature4.jpg" alt="Nature"/>'
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
await wrapper.setData({ loaded: true });
|
|
|
|
expect(wrapper.find('img').exists()).toBe(true);
|
|
|
|
});
|
2022-09-14 11:26:01 +00:00
|
|
|
});
|