From: Evan You Date: Tue, 9 Jun 2020 21:10:07 +0000 (-0400) Subject: test: test for table stringification bail X-Git-Tag: v3.0.0-beta.15~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f80183f1f878c008ce9c0dc84dd01105c9a0c68;p=thirdparty%2Fvuejs%2Fcore.git test: test for table stringification bail --- diff --git a/packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts b/packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts index 46fe259177..62d12af745 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 + }) + }) })