From a5a5214768d1e7030c695914bc35e840f00ba737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=98=8A=E7=BF=94?= <673686754@qq.com> Date: Sat, 5 Jan 2019 13:56:01 +0800 Subject: [PATCH] unit test: d2-page-cover Former-commit-id: b8af4e80b700b9dd89a83979e76c386c9673100f [formerly b8af4e80b700b9dd89a83979e76c386c9673100f [formerly b8af4e80b700b9dd89a83979e76c386c9673100f [formerly b8af4e80b700b9dd89a83979e76c386c9673100f [formerly d5214134e68bdedeb74b120641a5840a2af10b84 [formerly 76488a335bc0512b0bc637a6790cff8a0189abe1]]]]] Former-commit-id: e6b5fcd65ace783df85f8069a499f4f3f0f0dc59 Former-commit-id: 688e557e62c24ffdccbcd47ca72eab77dd41b5b8 Former-commit-id: 3bd0f57f281affe5fe3961a560fedc4d34e15033 [formerly 477e3ca31e3c90105f27e667f1c810e06a270264] Former-commit-id: 4734aee87fe4ebfc6b53f4807b74827479c34052 Former-commit-id: 76238a54f93938981d6a44ab6f5d2b1e900c05df Former-commit-id: 5cfbe6b537d02530f9455400b725b881a28ffabd Former-commit-id: 97fdf0aedf6afc759d707c56f0414b2888043c53 Former-commit-id: 807db838e760e4c85691899e2cf3ab7f88c909be --- tests/unit/d2-page-cover.spec.js | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/unit/d2-page-cover.spec.js 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: '