diff --git a/packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts b/packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts index c737071a827..bedec9fc00a 100644 --- a/packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts +++ b/packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts @@ -410,6 +410,29 @@ describe('stringify static html', () => { }) }) + // #6617 + test('should remove boolean attribute for `false`', () => { + const { ast } = compileWithStringify( + `${repeat( + `
`, + StringifyThresholds.NODE_COUNT + )}` + ) + expect(ast.hoists[0]).toMatchObject({ + type: NodeTypes.JS_CALL_EXPRESSION, + callee: CREATE_STATIC, + arguments: [ + JSON.stringify( + `${repeat( + ``, + StringifyThresholds.NODE_COUNT + )}` + ), + '21' + ] + }) + }) + test('should stringify svg', () => { const svg = `