Skip to content

Commit 7a5f53e

Browse files
committed
Try to fix test
1 parent bbb93bb commit 7a5f53e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

site/src/pages/WorkspaceBuildPage/WorkspaceBuildPageView.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,14 @@ const ScrollArea: FC<HTMLProps<HTMLDivElement>> = () => {
221221
const contentRef = useRef<HTMLDivElement>(null);
222222
const [height, setHeight] = useState<CSSProperties["height"]>("100%");
223223
useLayoutEffect(() => {
224+
// TODO: Mock ResizeObserver in the test environment. This is a temporary
225+
// workaround because the recommended way to mock ResizeObserver, as
226+
// described in the following reference, did not work:
227+
// https://github.com/ZeeCoder/use-resize-observer/issues/40#issuecomment-991256805
228+
if (window.ResizeObserver === undefined) {
229+
return;
230+
}
231+
224232
const contentEl = contentRef.current;
225233
if (!contentEl) {
226234
return;

0 commit comments

Comments
 (0)