diff --git a/tests/unit/d2-page-cover.spec.js b/tests/unit/d2-page-cover.spec.js new file mode 100644 index 00000000..b6b6ca22 --- /dev/null +++ b/tests/unit/d2-page-cover.spec.js @@ -0,0 +1,41 @@ +import { mount } from '@vue/test-utils' +import D2PageCover from '@/components/d2-page-cover/index.vue' + +describe('d2-page-cover', () => { + // 存在且是Vue组件实例 + it('is a vue instance', () => { + const wrapper = mount(D2PageCover) + + expect(wrapper.exists()).toBeTruthy() + expect(wrapper.isVueInstance()).toBeTruthy() + }) + + // 包含特定类名 + it('contains specific classnames', () => { + const wrapper = mount(D2PageCover, { + slots: { + default: '