From a4d01377ecf3a38def6fa886399c0c71b50f4ce8 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Sun, 9 Feb 2025 01:57:39 +0800 Subject: [PATCH] test: unit test for #728 --- packages/babel-plugin-jsx/test/index.test.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/babel-plugin-jsx/test/index.test.tsx b/packages/babel-plugin-jsx/test/index.test.tsx index 8869b12..c66f4cc 100644 --- a/packages/babel-plugin-jsx/test/index.test.tsx +++ b/packages/babel-plugin-jsx/test/index.test.tsx @@ -364,6 +364,20 @@ describe('PatchFlags', () => { expect(wrapper.html()).toBe('
NEED_PATCH
'); }); + test('#728: template literals with expressions should be treated as dynamic', async () => { + const wrapper = mount({ + setup() { + const foo = ref(0); + return () => ( + + ); + } + }); + patchFlagExpect(wrapper, 8, ['value', 'onClick']); + await wrapper.trigger('click'); + expect(wrapper.html()).toBe(''); + }) + test('full props', async () => { const wrapper = mount({ setup() {