Skip to content

Commit 3f80183

Browse files
committed
test: test for table stringification bail
1 parent a938b61 commit 3f80183

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts

+13
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,17 @@ describe('stringify static html', () => {
249249
type: NodeTypes.VNODE_CALL // not CALL_EXPRESSION
250250
})
251251
})
252+
253+
test('should bail on break content with innerHTML (eg.tables related tags)', () => {
254+
const { ast } = compileWithStringify(
255+
`<table><tbody>${repeat(
256+
`<tr class="foo"><td>foo</td></tr>`,
257+
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
258+
)}</tbody></table>`
259+
)
260+
expect(ast.hoists.length).toBe(1)
261+
expect(ast.hoists[0]).toMatchObject({
262+
type: NodeTypes.VNODE_CALL // not CALL_EXPRESSION
263+
})
264+
})
252265
})

0 commit comments

Comments
 (0)