hunk.code_window:     "csb:install": "pnpm i -g pnpm@7",
       "csb:build": "pnpm install && pnpm build",
       "clean": "pnpm -r run clean",
       "watch": "pnpm -r run watch",
       "build": "pnpm -r run build",
       "types:check": "pnpm -r run types:check",
       "prepublishOnly": "pnpm clean && pnpm build",
       "publish-beta": "pnpm publish --tag beta",
       "format": "prettier --write ./**/*.{ts,tsx}",
       "lint": "eslint . --ext .ts,.tsx --cache",
  
hunk.labels: keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:     "build": "pnpm build-package _internal && pnpm build-package core && pnpm build-package infinite && pnpm build-package immutable && pnpm build-package mutation",
       "build-package": "bunchee index.ts --cwd",
  
hunk.file_path: package.json
hunk.type: replace
file: import { act, screen } from '@testing-library/react'
  import React from 'react'
  import useSWR, { mutate } from 'swr'
  import { createKey, createResponse, renderWithGlobalCache } from './utils'
  
  describe('useSWR - context configs', () => {
    it('mutate before mount should not block rerender', async () => {
      const prefetch = () => createResponse('prefetch-data')
      const fetcher = () => createResponse('data')
      const key = createKey()
  
      await act(async () => {
        await mutate(key, prefetch)
      })
  
      function Page() {
        const { data } = useSWR(key, fetcher)
        return <div>{data}</div>
      }
  
      renderWithGlobalCache(<Page />)
      // render with the prefetched data
      screen.getByText('prefetch-data')
  
      // render the fetched data
      await screen.findByText('data')
    })
  })
  