From 9e16ea3d309e61a4de7e776e510254258c1e54ca Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 17 Nov 2019 21:29:12 -0500 Subject: [PATCH] test: update snapshots --- .../__snapshots__/hoistStatic.spec.ts.snap | 28 +++++++++---------- .../__snapshots__/index.spec.ts.snap | 2 +- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/packages/compiler-core/__tests__/transforms/__snapshots__/hoistStatic.spec.ts.snap b/packages/compiler-core/__tests__/transforms/__snapshots__/hoistStatic.spec.ts.snap index 8283cae1..8d83391b 100644 --- a/packages/compiler-core/__tests__/transforms/__snapshots__/hoistStatic.spec.ts.snap +++ b/packages/compiler-core/__tests__/transforms/__snapshots__/hoistStatic.spec.ts.snap @@ -2,7 +2,7 @@ exports[`compiler: hoistStatic transform hoist element with static key 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = _createVNode(\\"div\\", { key: \\"foo\\" }) @@ -19,7 +19,7 @@ return function render() { exports[`compiler: hoistStatic transform hoist nested static tree 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = _createVNode(\\"p\\", null, [ _createVNode(\\"span\\"), @@ -39,8 +39,7 @@ return function render() { exports[`compiler: hoistStatic transform hoist nested static tree with comments 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode -const _createCommentVNode = Vue.createCommentVNode +const { createVNode: _createVNode, createCommentVNode: _createCommentVNode } = Vue const _hoisted_1 = _createVNode(\\"div\\", null, [ _createCommentVNode(\\"comment\\") @@ -59,7 +58,7 @@ return function render() { exports[`compiler: hoistStatic transform hoist siblings with common non-hoistable parent 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = _createVNode(\\"span\\") const _hoisted_2 = _createVNode(\\"div\\") @@ -78,7 +77,7 @@ return function render() { exports[`compiler: hoistStatic transform hoist simple element 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = _createVNode(\\"span\\", { class: \\"inline\\" }, \\"hello\\") @@ -95,7 +94,7 @@ return function render() { exports[`compiler: hoistStatic transform hoist static props for elements with directives 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = { id: \\"foo\\" } @@ -116,7 +115,7 @@ return function render() { exports[`compiler: hoistStatic transform hoist static props for elements with dynamic text children 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = { id: \\"foo\\" } @@ -133,7 +132,7 @@ return function render() { exports[`compiler: hoistStatic transform hoist static props for elements with unhoistable children 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = { id: \\"foo\\" } @@ -154,7 +153,7 @@ return function render() { exports[`compiler: hoistStatic transform prefixIdentifiers hoist class with static object value 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = { class: { foo: true } } @@ -171,7 +170,7 @@ return function render() { exports[`compiler: hoistStatic transform prefixIdentifiers hoist nested static tree with static interpolation 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = _createVNode(\\"span\\", null, [ \\"foo \\", @@ -193,7 +192,7 @@ return function render() { exports[`compiler: hoistStatic transform prefixIdentifiers hoist nested static tree with static prop value 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = _createVNode(\\"span\\", { foo: 0 }, _toString(1)) @@ -349,7 +348,7 @@ return function render() { exports[`compiler: hoistStatic transform should hoist v-for children if static 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = { id: \\"foo\\" } const _hoisted_2 = _createVNode(\\"span\\") @@ -371,8 +370,7 @@ return function render() { exports[`compiler: hoistStatic transform should hoist v-if props/children if static 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode -const _createCommentVNode = Vue.createCommentVNode +const { createVNode: _createVNode, createCommentVNode: _createCommentVNode } = Vue const _hoisted_1 = { key: 0, diff --git a/packages/compiler-dom/__tests__/__snapshots__/index.spec.ts.snap b/packages/compiler-dom/__tests__/__snapshots__/index.spec.ts.snap index b26a3e6b..1b8d51eb 100644 --- a/packages/compiler-dom/__tests__/__snapshots__/index.spec.ts.snap +++ b/packages/compiler-dom/__tests__/__snapshots__/index.spec.ts.snap @@ -2,7 +2,7 @@ exports[`compile should contain standard transforms 1`] = ` "const _Vue = Vue -const _createVNode = Vue.createVNode +const { createVNode: _createVNode } = Vue const _hoisted_1 = {}