From b70f8d267e1de1c6e8bd50312455f99e9f0c7631 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 23 Aug 2019 15:32:19 -0400 Subject: [PATCH] test: fix temp tests --- .../runtime-core/__tests__/apiInject.spec.ts | 4 +- .../__tests__/apiLifecycle.spec.ts | 4 +- .../__tests__/apiSetupContext.spec.ts | 4 +- .../__tests__/apiTemplateRef.spec.ts | 4 +- .../runtime-core/__tests__/apiWatch.spec.ts | 4 +- packages/runtime-core/__tests__/h.spec.ts | 3 ++ .../__tests__/vdomComponent.spec.ts | 4 +- .../__tests__/vdomOptimizedMode.spec.ts | 4 +- packages/vue-compat/__tests__/compat.spec.ts | 38 ++----------------- 9 files changed, 27 insertions(+), 42 deletions(-) diff --git a/packages/runtime-core/__tests__/apiInject.spec.ts b/packages/runtime-core/__tests__/apiInject.spec.ts index bcb6110c..a11163a6 100644 --- a/packages/runtime-core/__tests__/apiInject.spec.ts +++ b/packages/runtime-core/__tests__/apiInject.spec.ts @@ -1,3 +1,5 @@ // reference: https://vue-composition-api-rfc.netlify.com/api.html#provide-inject -describe('api: provide/inject', () => {}) +describe('api: provide/inject', () => { + test.todo('should work') +}) diff --git a/packages/runtime-core/__tests__/apiLifecycle.spec.ts b/packages/runtime-core/__tests__/apiLifecycle.spec.ts index 40b2e58d..dd0c8fba 100644 --- a/packages/runtime-core/__tests__/apiLifecycle.spec.ts +++ b/packages/runtime-core/__tests__/apiLifecycle.spec.ts @@ -1,3 +1,5 @@ // reference: https://vue-composition-api-rfc.netlify.com/api.html#lifecycle-hooks -describe('api: lifecycle hooks', () => {}) +describe('api: lifecycle hooks', () => { + test.todo('should work') +}) diff --git a/packages/runtime-core/__tests__/apiSetupContext.spec.ts b/packages/runtime-core/__tests__/apiSetupContext.spec.ts index a27755a6..46b65e3a 100644 --- a/packages/runtime-core/__tests__/apiSetupContext.spec.ts +++ b/packages/runtime-core/__tests__/apiSetupContext.spec.ts @@ -1,3 +1,5 @@ // reference: https://vue-composition-api-rfc.netlify.com/api.html#setup -describe('api: setup context', () => {}) +describe('api: setup context', () => { + test.todo('should work') +}) diff --git a/packages/runtime-core/__tests__/apiTemplateRef.spec.ts b/packages/runtime-core/__tests__/apiTemplateRef.spec.ts index afad07ae..ed49ae56 100644 --- a/packages/runtime-core/__tests__/apiTemplateRef.spec.ts +++ b/packages/runtime-core/__tests__/apiTemplateRef.spec.ts @@ -1,3 +1,5 @@ // reference: https://vue-composition-api-rfc.netlify.com/api.html#template-refs -describe('api: template refs', () => {}) +describe('api: template refs', () => { + test.todo('should work') +}) diff --git a/packages/runtime-core/__tests__/apiWatch.spec.ts b/packages/runtime-core/__tests__/apiWatch.spec.ts index 46c3bba1..9270aed5 100644 --- a/packages/runtime-core/__tests__/apiWatch.spec.ts +++ b/packages/runtime-core/__tests__/apiWatch.spec.ts @@ -1,3 +1,5 @@ // reference: https://vue-composition-api-rfc.netlify.com/api.html#watch -describe('api: watch', () => {}) +describe('api: watch', () => { + test.todo('should work') +}) diff --git a/packages/runtime-core/__tests__/h.spec.ts b/packages/runtime-core/__tests__/h.spec.ts index e69de29b..401de464 100644 --- a/packages/runtime-core/__tests__/h.spec.ts +++ b/packages/runtime-core/__tests__/h.spec.ts @@ -0,0 +1,3 @@ +describe('vdom: h', () => { + test.todo('should work') +}) diff --git a/packages/runtime-core/__tests__/vdomComponent.spec.ts b/packages/runtime-core/__tests__/vdomComponent.spec.ts index 70b786d1..a9abae43 100644 --- a/packages/runtime-core/__tests__/vdomComponent.spec.ts +++ b/packages/runtime-core/__tests__/vdomComponent.spec.ts @@ -1 +1,3 @@ -// TODO +describe('vdom: component', () => { + test.todo('should work') +}) diff --git a/packages/runtime-core/__tests__/vdomOptimizedMode.spec.ts b/packages/runtime-core/__tests__/vdomOptimizedMode.spec.ts index 70b786d1..6542f178 100644 --- a/packages/runtime-core/__tests__/vdomOptimizedMode.spec.ts +++ b/packages/runtime-core/__tests__/vdomOptimizedMode.spec.ts @@ -1 +1,3 @@ -// TODO +describe('vdom: optimized mode', () => { + test.todo('should work') +}) diff --git a/packages/vue-compat/__tests__/compat.spec.ts b/packages/vue-compat/__tests__/compat.spec.ts index 38b67f76..f07870ac 100644 --- a/packages/vue-compat/__tests__/compat.spec.ts +++ b/packages/vue-compat/__tests__/compat.spec.ts @@ -1,39 +1,7 @@ ;(global as any).__COMPAT__ = true -import Vue from '../src/index' +// import Vue from '../src/index' -describe('2.x compat build', async () => { - test('should work', async () => { - const root = document.createElement('div') - document.body.appendChild(root) - - const mounted = jest.fn() - const updated = jest.fn() - - const instance = new Vue({ - data() { - return { count: 0 } - }, - methods: { - change() { - this.count++ - } - }, - render(h: any) { - return h('div', this.count) - }, - mounted, - updated - }).$mount(root) - - expect(instance.count).toBe(0) - expect(root.textContent).toBe('0') - expect(mounted).toHaveBeenCalled() - - instance.change() - expect(instance.count).toBe(1) - await Vue.nextTick() - expect(root.textContent).toBe('1') - expect(updated).toHaveBeenCalled() - }) +describe('2.x compat build', () => { + test.todo('should work') })