Skip to content

Commit

Permalink
Update packages/react/src/hooks/useIsomorphicLayoutEffect.spec.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Jonghyeon Ko <[email protected]>
  • Loading branch information
ssi02014 and Jonghyeon Ko authored Nov 6, 2023
1 parent 3e90dbc commit d85078f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react/src/hooks/useIsomorphicLayoutEffect.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand All @@ -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,
})
Expand All @@ -26,3 +26,4 @@ describe('useIsomorphicLayoutEffect', () => {
expect(useIsomorphicLayoutEffect).toEqual(useLayoutEffect)
})
})

Check failure on line 29 in packages/react/src/hooks/useIsomorphicLayoutEffect.spec.ts

View workflow job for this annotation

GitHub Actions / Check quality (lint)

Delete `⏎`

0 comments on commit d85078f

Please sign in to comment.