From 3f80183f1f878c008ce9c0dc84dd01105c9a0c68 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 9 Jun 2020 17:10:07 -0400 Subject: [PATCH] test: test for table stringification bail --- .../__tests__/transforms/stringifyStatic.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts b/packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts index 46fe2591..62d12af7 100644 --- a/packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts +++ b/packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts @@ -249,4 +249,17 @@ describe('stringify static html', () => { type: NodeTypes.VNODE_CALL // not CALL_EXPRESSION }) }) + + test('should bail on break content with innerHTML (eg.tables related tags)', () => { + const { ast } = compileWithStringify( + `${repeat( + ``, + StringifyThresholds.ELEMENT_WITH_BINDING_COUNT + )}
foo
` + ) + expect(ast.hoists.length).toBe(1) + expect(ast.hoists[0]).toMatchObject({ + type: NodeTypes.VNODE_CALL // not CALL_EXPRESSION + }) + }) })