Home / File/ proxy-hmr.spec.ts — vite Source File

proxy-hmr.spec.ts — vite Source File

Architecture documentation for proxy-hmr.spec.ts, a typescript file in the vite codebase. 2 imports, 0 dependents.

File typescript 2 imports

Entity Profile

Dependency Diagram

graph LR
  91349bd5_f317_be85_1242_6ec16607b86e["proxy-hmr.spec.ts"]
  a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"]
  91349bd5_f317_be85_1242_6ec16607b86e --> a340ba46_b2b7_3048_3bb3_6907a74c8464
  d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"]
  91349bd5_f317_be85_1242_6ec16607b86e --> d3fd5575_295b_d6be_24dd_62d277645dc9
  style 91349bd5_f317_be85_1242_6ec16607b86e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { expect, test } from 'vitest'
import {
  editFile,
  isBuild,
  page,
  untilBrowserLogAfter,
  viteTestUrl,
} from '~utils'

test.runIf(!isBuild)('proxy-hmr', async () => {
  await untilBrowserLogAfter(
    () => page.goto(viteTestUrl),
    // wait for both main and sub app HMR connection
    [/connected/, /connected/],
  )

  const otherAppTextLocator = page.frameLocator('iframe').locator('.content')
  await expect
    .poll(() => otherAppTextLocator.textContent())
    .toMatch('other app')
  editFile('other-app/index.html', (code) =>
    code.replace('app', 'modified app'),
  )
  await expect
    .poll(() => otherAppTextLocator.textContent())
    .toMatch('other modified app')
})

Dependencies

  • vitest
  • ~utils

Frequently Asked Questions

What does proxy-hmr.spec.ts do?
proxy-hmr.spec.ts is a source file in the vite codebase, written in typescript.
What does proxy-hmr.spec.ts depend on?
proxy-hmr.spec.ts imports 2 module(s): vitest, ~utils.
Where is proxy-hmr.spec.ts in the architecture?
proxy-hmr.spec.ts is located at playground/proxy-hmr/__tests__/proxy-hmr.spec.ts (directory: playground/proxy-hmr/__tests__).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free