|
|
@@ -306,14 +306,19 @@ describe('compiler: expression transform', () => {
|
|
|
]
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
test('should not prefix an object property key', () => {
|
|
|
const node = parseWithExpressionTransform(
|
|
|
- `{{ { foo: bar } }}`
|
|
|
+ `{{ { foo() { baz() }, value: bar } }}`
|
|
|
) as InterpolationNode
|
|
|
expect(node.content).toMatchObject({
|
|
|
type: NodeTypes.COMPOUND_EXPRESSION,
|
|
|
- children: [`{ foo: `, { content: `_ctx.bar` }, ` }`]
|
|
|
+ children: [
|
|
|
+ `{ foo() { `,
|
|
|
+ { content: `_ctx.baz` },
|
|
|
+ `() }, value: `,
|
|
|
+ { content: `_ctx.bar` },
|
|
|
+ ` }`
|
|
|
+ ]
|
|
|
})
|
|
|
})
|
|
|
|