Skip to content

Commit e861c6d

Browse files
committed
test: test updates for d40c642
1 parent e3988b4 commit e861c6d

37 files changed

+1259
-1322
lines changed

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
'!packages/template-explorer/**',
2020
'!packages/size-check/**'
2121
],
22-
watchPathIgnorePatterns: ['/node_modules/'],
22+
watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'],
2323
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
2424
moduleNameMapper: {
2525
'^@vue/(.*?)$': '<rootDir>/packages/$1/src',

packages/compiler-core/__tests__/__snapshots__/codegen.spec.ts.snap

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ return function render(_ctx, _cache) {
5959
}"
6060
`;
6161

62-
exports[`compiler: codegen SequenceExpression 1`] = `
63-
"
64-
return function render(_ctx, _cache) {
65-
with (this) {
66-
return (foo, bar(baz))
67-
}
68-
}"
69-
`;
70-
7162
exports[`compiler: codegen assets + temps 1`] = `
7263
"
7364
return function render(_ctx, _cache) {
@@ -106,7 +97,7 @@ exports[`compiler: codegen forNode 1`] = `
10697
"
10798
return function render(_ctx, _cache) {
10899
with (this) {
109-
return (foo, bar)
100+
return (_openBlock(true), _createBlock(_Fragment, null, _renderList(), 1))
110101
}
111102
}"
112103
`;
@@ -147,7 +138,9 @@ exports[`compiler: codegen ifNode 1`] = `
147138
"
148139
return function render(_ctx, _cache) {
149140
with (this) {
150-
return (foo, bar)
141+
return foo
142+
? bar
143+
: baz
151144
}
152145
}"
153146
`;

packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ return function render(_ctx, _cache) {
1212
class: bar.baz
1313
}, [
1414
_createTextVNode(_toDisplayString(world.burn()) + \\" \\", 1 /* TEXT */),
15-
(_openBlock(), ok
16-
? _createBlock(\\"div\\", { key: 0 }, \\"yes\\")
17-
: _createBlock(_Fragment, { key: 1 }, [\\"no\\"])),
15+
ok
16+
? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\"))
17+
: (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\\"no\\"])),
1818
(_openBlock(true), _createBlock(_Fragment, null, _renderList(list, (value, index) => {
1919
return (_openBlock(), _createBlock(\\"div\\", null, [
2020
_createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */)
@@ -34,9 +34,9 @@ return function render(_ctx, _cache) {
3434
class: _ctx.bar.baz
3535
}, [
3636
_createTextVNode(_toDisplayString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */),
37-
(_openBlock(), (_ctx.ok)
38-
? _createBlock(\\"div\\", { key: 0 }, \\"yes\\")
39-
: _createBlock(_Fragment, { key: 1 }, [\\"no\\"])),
37+
(_ctx.ok)
38+
? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\"))
39+
: (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\\"no\\"])),
4040
(_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {
4141
return (_openBlock(), _createBlock(\\"div\\", null, [
4242
_createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */)
@@ -55,9 +55,9 @@ export function render(_ctx, _cache) {
5555
class: _ctx.bar.baz
5656
}, [
5757
_createTextVNode(_toDisplayString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */),
58-
(_openBlock(), (_ctx.ok)
59-
? _createBlock(\\"div\\", { key: 0 }, \\"yes\\")
60-
: _createBlock(_Fragment, { key: 1 }, [\\"no\\"])),
58+
(_ctx.ok)
59+
? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\"))
60+
: (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\\"no\\"])),
6161
(_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {
6262
return (_openBlock(), _createBlock(\\"div\\", null, [
6363
_createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */)

packages/compiler-core/__tests__/__snapshots__/scopeId.spec.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`scopeId compiler support should push scopeId for hoisted nodes 1`] = `
4-
"import { createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createBlock as _createBlock, openBlock as _openBlock, withScopeId as _withScopeId, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \\"vue\\"
4+
"import { createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \\"vue\\"
55
const _withId = _withScopeId(\\"test\\")
66
77
_pushScopeId(\\"test\\")
@@ -19,7 +19,7 @@ export const render = _withId(function render(_ctx, _cache) {
1919
`;
2020

2121
exports[`scopeId compiler support should wrap default slot 1`] = `
22-
"import { createVNode as _createVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, openBlock as _openBlock, withScopeId as _withScopeId } from \\"vue\\"
22+
"import { createVNode as _createVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
2323
const _withId = _withScopeId(\\"test\\")
2424
2525
export const render = _withId(function render(_ctx, _cache) {
@@ -35,7 +35,7 @@ export const render = _withId(function render(_ctx, _cache) {
3535
`;
3636

3737
exports[`scopeId compiler support should wrap dynamic slots 1`] = `
38-
"import { createVNode as _createVNode, resolveComponent as _resolveComponent, renderList as _renderList, createSlots as _createSlots, createBlock as _createBlock, openBlock as _openBlock, withScopeId as _withScopeId } from \\"vue\\"
38+
"import { createVNode as _createVNode, resolveComponent as _resolveComponent, renderList as _renderList, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
3939
const _withId = _withScopeId(\\"test\\")
4040
4141
export const render = _withId(function render(_ctx, _cache) {
@@ -63,7 +63,7 @@ export const render = _withId(function render(_ctx, _cache) {
6363
`;
6464

6565
exports[`scopeId compiler support should wrap named slots 1`] = `
66-
"import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createVNode as _createVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, openBlock as _openBlock, withScopeId as _withScopeId } from \\"vue\\"
66+
"import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createVNode as _createVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
6767
const _withId = _withScopeId(\\"test\\")
6868
6969
export const render = _withId(function render(_ctx, _cache) {
@@ -82,7 +82,7 @@ export const render = _withId(function render(_ctx, _cache) {
8282
`;
8383

8484
exports[`scopeId compiler support should wrap render function 1`] = `
85-
"import { createVNode as _createVNode, createBlock as _createBlock, openBlock as _openBlock, withScopeId as _withScopeId } from \\"vue\\"
85+
"import { createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
8686
const _withId = _withScopeId(\\"test\\")
8787
8888
export const render = _withId(function render(_ctx, _cache) {

0 commit comments

Comments
 (0)