From e9c954f14160454ffa3ada04c20fbcc74b3d3855 Mon Sep 17 00:00:00 2001 From: tycho Date: Fri, 18 Oct 2024 17:43:19 +0800 Subject: [PATCH] test: add test --- packages/runtime-dom/__tests__/patchProps.spec.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/runtime-dom/__tests__/patchProps.spec.ts b/packages/runtime-dom/__tests__/patchProps.spec.ts index 304d9f9c1..54f4d3604 100644 --- a/packages/runtime-dom/__tests__/patchProps.spec.ts +++ b/packages/runtime-dom/__tests__/patchProps.spec.ts @@ -394,4 +394,12 @@ describe('runtime-dom: props patching', () => { expect(fn).toBeCalledTimes(0) }) + + // #12211 + test('should not override content when `text` attribute is set', () => { + const root = document.createElement('div') + render(h('a', { text: '' }, ['foo']), root) + const a = root.children[0] + expect(a.textContent).toBe('foo') + }) })