Create DeferredContent.spec.js
parent
07fcb3db01
commit
ebc0609501
|
@ -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);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue