From 6c401924e26c297250923c228db68c6f37cb6e2b Mon Sep 17 00:00:00 2001 From: NKDuy Date: Tue, 5 Dec 2023 18:43:54 +0700 Subject: [PATCH] fix(runtime): adds a testing check to the forceUpdate method --- src/runtime/update-component.ts | 2 +- src/testing/platform/testing-build.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/update-component.ts b/src/runtime/update-component.ts index 922601cb..ea45775f 100644 --- a/src/runtime/update-component.ts +++ b/src/runtime/update-component.ts @@ -362,7 +362,7 @@ export const postUpdateComponent = (hostRef: d.HostRef) => { }; export const forceUpdate = (ref: any) => { - if (BUILD.updatable && Build.isBrowser) { + if (BUILD.updatable && (Build.isBrowser || Build.isTesting)) { const hostRef = getHostRef(ref); const isConnected = hostRef.$hostElement$.isConnected; if ( diff --git a/src/testing/platform/testing-build.ts b/src/testing/platform/testing-build.ts index dcf957b8..bf00e6be 100644 --- a/src/testing/platform/testing-build.ts +++ b/src/testing/platform/testing-build.ts @@ -2,7 +2,7 @@ import type * as d from '@rindo/core/internal'; export const Build: d.UserBuildConditionals = { isDev: true, - isBrowser: true, - isServer: false, + isBrowser: false, + isServer: true, isTesting: true, };