From d85078f251f8cbd339d57a91bdc07e0eb14f15a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gromit=20=28=EC=A0=84=EB=AF=BC=EC=9E=AC=29?= <64779472+ssi02014@users.noreply.github.com> Date: Mon, 6 Nov 2023 22:46:00 +0900 Subject: [PATCH] Update packages/react/src/hooks/useIsomorphicLayoutEffect.spec.ts Co-authored-by: Jonghyeon Ko --- packages/react/src/hooks/useIsomorphicLayoutEffect.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react/src/hooks/useIsomorphicLayoutEffect.spec.ts b/packages/react/src/hooks/useIsomorphicLayoutEffect.spec.ts index f4033270e..16752f54d 100644 --- a/packages/react/src/hooks/useIsomorphicLayoutEffect.spec.ts +++ b/packages/react/src/hooks/useIsomorphicLayoutEffect.spec.ts @@ -2,13 +2,13 @@ import { useEffect, useLayoutEffect } from 'react' import { afterEach, expect, vi } from 'vitest' describe('useIsomorphicLayoutEffect', () => { - const originWindow = { ...global.window } + const originWindow = global.window afterEach(() => { vi.resetModules() }) - it('should return useEffect in server environment', async () => { + it('should be useEffect in server environment', async () => { Object.defineProperty(global, 'window', { value: undefined, }) @@ -17,7 +17,7 @@ describe('useIsomorphicLayoutEffect', () => { expect(useIsomorphicLayoutEffect).toEqual(useEffect) }) - it('should return useLayoutEffect in client environment', async () => { + it('should be useLayoutEffect in client environment', async () => { Object.defineProperty(global, 'window', { value: originWindow, }) @@ -26,3 +26,4 @@ describe('useIsomorphicLayoutEffect', () => { expect(useIsomorphicLayoutEffect).toEqual(useLayoutEffect) }) }) +