From 8ce63aa707fdb359357e8181b16c9080b62ed47f Mon Sep 17 00:00:00 2001 From: daiwei Date: Fri, 22 Nov 2024 14:29:38 +0800 Subject: [PATCH] test: add more case --- packages/runtime-core/__tests__/hydration.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/__tests__/hydration.spec.ts b/packages/runtime-core/__tests__/hydration.spec.ts index e7596a019..763356c43 100644 --- a/packages/runtime-core/__tests__/hydration.spec.ts +++ b/packages/runtime-core/__tests__/hydration.spec.ts @@ -2205,16 +2205,18 @@ describe('SSR hydration', () => { expect(`Hydration style mismatch`).not.toHaveBeenWarned() }) - test('should not warn on css v-bind non-string & non-number & empty string value', () => { + test('style var with falsy values', () => { const container = document.createElement('div') container.innerHTML = `
` const app = createSSRApp({ setup() { const value1 = ref(null) const value2 = ref('') + const value3 = ref(undefined) useCssVars(() => ({ foo: value1.value, bar: value2.value, + baz: value3.value, })) return () => h(Child) },