Home / File/ hostCheck.spec.ts — vite Source File

hostCheck.spec.ts — vite Source File

Architecture documentation for hostCheck.spec.ts, a typescript file in the vite codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  47cf80ca_01f8_9764_8b18_1423c86b4a7a["hostCheck.spec.ts"]
  b99bdf00_fae6_d4c5_885f_b35d01f276cc["hostCheck.ts"]
  47cf80ca_01f8_9764_8b18_1423c86b4a7a --> b99bdf00_fae6_d4c5_885f_b35d01f276cc
  bb5427aa_a10c_1274_370a_b27a490b7340["getAdditionalAllowedHosts"]
  47cf80ca_01f8_9764_8b18_1423c86b4a7a --> bb5427aa_a10c_1274_370a_b27a490b7340
  a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"]
  47cf80ca_01f8_9764_8b18_1423c86b4a7a --> a340ba46_b2b7_3048_3bb3_6907a74c8464
  style 47cf80ca_01f8_9764_8b18_1423c86b4a7a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { expect, test } from 'vitest'
import { getAdditionalAllowedHosts } from '../hostCheck'

test('getAdditionalAllowedHosts', async () => {
  const actual = getAdditionalAllowedHosts(
    {
      host: 'vite.host.example.com',
      hmr: {
        host: 'vite.hmr-host.example.com',
      },
      origin: 'http://vite.origin.example.com:5173',
    },
    {
      host: 'vite.preview-host.example.com',
    },
  ).sort()
  expect(actual).toStrictEqual(
    [
      'vite.host.example.com',
      'vite.hmr-host.example.com',
      'vite.origin.example.com',
      'vite.preview-host.example.com',
    ].sort(),
  )
})

Domain

Frequently Asked Questions

What does hostCheck.spec.ts do?
hostCheck.spec.ts is a source file in the vite codebase, written in typescript. It belongs to the ViteCore domain.
What does hostCheck.spec.ts depend on?
hostCheck.spec.ts imports 3 module(s): getAdditionalAllowedHosts, hostCheck.ts, vitest.
Where is hostCheck.spec.ts in the architecture?
hostCheck.spec.ts is located at packages/vite/src/node/server/middlewares/__tests__/hostCheck.spec.ts (domain: ViteCore, directory: packages/vite/src/node/server/middlewares/__tests__).

Analyze Your Own Codebase

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

Try Supermodel Free