Home / File/ preload-disabled.spec.ts — vite Source File

preload-disabled.spec.ts — vite Source File

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

File typescript 2 imports

Entity Profile

Dependency Diagram

graph LR
  9e6a75e0_4401_cbe9_8aed_ea3de2a80b3e["preload-disabled.spec.ts"]
  a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"]
  9e6a75e0_4401_cbe9_8aed_ea3de2a80b3e --> a340ba46_b2b7_3048_3bb3_6907a74c8464
  d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"]
  9e6a75e0_4401_cbe9_8aed_ea3de2a80b3e --> d3fd5575_295b_d6be_24dd_62d277645dc9
  style 9e6a75e0_4401_cbe9_8aed_ea3de2a80b3e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { describe, expect, test } from 'vitest'
import { browserLogs, isBuild, page } from '~utils'

test('should have no 404s', () => {
  browserLogs.forEach((msg) => {
    expect(msg).not.toMatch('404')
  })
})

describe.runIf(isBuild)('build', () => {
  test('dynamic import', async () => {
    await page.waitForSelector('#done')
    expect(await page.textContent('#done')).toBe('ran js')
  })

  test('dynamic import with comments', async () => {
    await page.click('#hello .load')
    await page.waitForSelector('#hello output')

    const html = await page.content()
    expect(html).not.toMatch(/link rel="modulepreload"/)

    expect(html).toMatch(
      /link rel="stylesheet".*?href=".*?\/assets\/hello-[-\w]{8}\.css"/,
    )
  })
})

Dependencies

  • vitest
  • ~utils

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free