From 0adceac17b726861d4ccd836ef25b9dc45313b8d Mon Sep 17 00:00:00 2001 From: jixinbao Date: Fri, 30 Aug 2024 11:01:56 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E9=80=82=E9=85=8D=20button=20=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E9=BB=98=E8=AE=A4=E6=B7=BB=E5=8A=A0=20hoverclass=3D"b?= =?UTF-8?q?utton-hover"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/runtime-core/__tests__/hmr.spec.ts | 16 +++++++++++----- .../runtime-core/__tests__/hydration.spec.ts | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/runtime-core/__tests__/hmr.spec.ts b/packages/runtime-core/__tests__/hmr.spec.ts index 000fbf40bf8..1da17f950d7 100644 --- a/packages/runtime-core/__tests__/hmr.spec.ts +++ b/packages/runtime-core/__tests__/hmr.spec.ts @@ -182,7 +182,9 @@ describe('hot module replacement', () => { } render(h(Parent), root) - expect(serializeInner(root)).toBe(`
0
`) + expect(serializeInner(root)).toBe( + `
0
`, + ) reload(childId, { __hmrId: childId, @@ -252,7 +254,9 @@ describe('hot module replacement', () => { } render(h(Parent), root) - expect(serializeInner(root)).toBe(`
0
`) + expect(serializeInner(root)).toBe( + `
0
`, + ) reload(childId, { __hmrId: childId, @@ -330,7 +334,9 @@ describe('hot module replacement', () => { } render(h(Parent), root) - expect(serializeInner(root)).toBe(`
0
`) + expect(serializeInner(root)).toBe( + `
0
`, + ) reload(childId, { __hmrId: childId, @@ -437,14 +443,14 @@ describe('hot module replacement', () => { render(h(Comp), root) expect(serializeInner(root)).toBe( - `
0
`, + `
0
`, ) // 1. click to trigger update triggerEvent((root as any).children[0].children[1], 'click') await nextTick() expect(serializeInner(root)).toBe( - `
1
`, + `
1
`, ) // 2. trigger HMR diff --git a/packages/runtime-core/__tests__/hydration.spec.ts b/packages/runtime-core/__tests__/hydration.spec.ts index 6caa2442e18..e6c227de6e6 100644 --- a/packages/runtime-core/__tests__/hydration.spec.ts +++ b/packages/runtime-core/__tests__/hydration.spec.ts @@ -773,7 +773,7 @@ describe('SSR hydration', () => { serverResolve(Comp) const html = await htmlPromise expect(html).toMatchInlineSnapshot( - `"helloworld"`, + `"helloworld"`, ) // hydration