From: daiwei Date: Fri, 25 Apr 2025 02:46:31 +0000 (+0800) Subject: test: update X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d8284b8722aadb6d7791c90b55bde580ab409c4;p=thirdparty%2Fvuejs%2Fcore.git test: update --- diff --git a/packages/runtime-vapor/__tests__/hydration.spec.ts b/packages/runtime-vapor/__tests__/hydration.spec.ts index f1fd4760d4..d33d4c24d5 100644 --- a/packages/runtime-vapor/__tests__/hydration.spec.ts +++ b/packages/runtime-vapor/__tests__/hydration.spec.ts @@ -237,14 +237,28 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
-foo-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
` + + `
foo
-foo-` + + `
` + + `` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
-bar-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
` + + `
bar
-bar-` + + `
` + + `` + + `` + + `
`, ) }) @@ -283,14 +297,14 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
"`, + expect(container.innerHTML).toBe( + `
foo
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
"`, + expect(container.innerHTML).toBe( + `
bar
`, ) }) @@ -304,14 +318,30 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
` + + `` + + `
foo
` + + `` + + `
` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
` + + `` + + `
bar
` + + `` + + `
` + + `` + + `
`, ) }) @@ -330,14 +360,24 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foofoo
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `foo` + + `foo` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
barbar
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `bar` + + `bar` + + `` + + `
`, ) }) @@ -351,14 +391,24 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
foo
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
foo
` + + `
foo
` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
bar
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
bar
` + + `
bar
` + + `` + + `
`, ) }) @@ -372,14 +422,32 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
foo
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
` + + `` + + `
foo
` + + `
foo
` + + `` + + `
` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
bar
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
` + + `` + + `
bar
` + + `
bar
` + + `` + + `
` + + `` + + `
`, ) }) @@ -399,14 +467,26 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foofoo
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `foo` + + `` + + `foo` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
barbar
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `bar` + + `` + + `bar` + + `` + + `
`, ) }) @@ -426,14 +506,26 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo foo foo
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `foo` + + ` foo ` + + `foo` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar bar bar
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `bar` + + ` bar ` + + `bar` + + `` + + `
`, ) }) @@ -451,14 +543,22 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
-foo
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
foo
-foo` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
-bar
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
bar
-bar` + + `` + + `
`, ) }) @@ -472,14 +572,22 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
-foo-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
foo
-foo-` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
-bar-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
bar
-bar-` + + `` + + `
`, ) }) @@ -493,14 +601,30 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
-foo-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
` + + `` + + `
foo
-foo-` + + `` + + `
` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
-bar-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
` + + `` + + `
bar
-bar-` + + `` + + `
` + + `` + + `
`, ) }) @@ -519,14 +643,28 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
-foo
foo
-foo
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
foo
-foo` + + `` + + `
foo
-foo` + + `` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
-bar
bar
-bar
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
bar
-bar` + + `` + + `
bar
-bar` + + `` + + `` + + `
`, ) }) @@ -540,14 +678,28 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
-foo-
foo
-foo-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
foo
-foo-` + + `` + + `
foo
-foo-` + + `` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
-bar-
bar
-bar-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
bar
-bar-` + + `` + + `
bar
-bar-` + + `` + + `` + + `
`, ) }) @@ -561,14 +713,36 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
-foo-
foo
-foo-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
` + + `` + + `
foo
-foo-` + + `` + + `
foo
-foo-` + + `` + + `` + + `
` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
-bar-
bar
-bar-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
` + + `` + + `
bar
-bar-` + + `` + + `
bar
-bar-` + + `` + + `` + + `
` + + `` + + `
`, ) }) @@ -582,14 +756,28 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
-foo-
foo
-foo-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `` + + `
foo
-foo-` + + `
foo
-foo-` + + `` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
-bar-
bar
-bar-
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `` + + `
bar
-bar-` + + `
bar
-bar-` + + `` + + `` + + `
`, ) }) @@ -609,14 +797,26 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
-foo
foo
-foo
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
foo
-foo` + + `` + + `
foo
-foo` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
-bar
bar
-bar
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
bar
-bar` + + `` + + `
bar
-bar` + + `` + + `
`, ) }) @@ -636,14 +836,26 @@ describe('Vapor Mode hydration', () => { Child: ``, }, ) - expect(container.innerHTML).toMatchInlineSnapshot( - `"
foo
-foo foo
foo
-foo
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
foo
-foo` + + ` foo ` + + `
foo
-foo` + + `` + + `
`, ) data.value = 'bar' await nextTick() - expect(container.innerHTML).toMatchInlineSnapshot( - `"
bar
-bar bar
bar
-bar
"`, + expect(container.innerHTML).toBe( + `
` + + `` + + `
bar
-bar` + + ` bar ` + + `
bar
-bar` + + `` + + `
`, ) })