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

readme.spec.ts — vite Source File

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

File typescript 4 imports

Entity Profile

Dependency Diagram

graph LR
  d862eebd_c4e7_ee7d_b507_2134ceabe639["readme.spec.ts"]
  e6032fbc_44cf_58d6_868d_dd15106c18c5["node:fs"]
  d862eebd_c4e7_ee7d_b507_2134ceabe639 --> e6032fbc_44cf_58d6_868d_dd15106c18c5
  51e96894_3556_ed5c_1ede_97d449867adf["node:path"]
  d862eebd_c4e7_ee7d_b507_2134ceabe639 --> 51e96894_3556_ed5c_1ede_97d449867adf
  a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"]
  d862eebd_c4e7_ee7d_b507_2134ceabe639 --> a340ba46_b2b7_3048_3bb3_6907a74c8464
  2616bf8c_8895_7af5_fb6e_8424b9e71ea7[".."]
  d862eebd_c4e7_ee7d_b507_2134ceabe639 --> 2616bf8c_8895_7af5_fb6e_8424b9e71ea7
  style d862eebd_c4e7_ee7d_b507_2134ceabe639 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import fs from 'node:fs'
import path from 'node:path'
import { expect, test } from 'vitest'
import { cspHashes } from '..'

test('CSP hashes in README.md should be correct', () => {
  const readme = fs.readFileSync(
    path.resolve(import.meta.dirname, '../../README.md'),
    'utf-8',
  )
  const hashesInDoc = [...readme.matchAll(/`sha256-(.+)`/g)].map(
    (match) => match[1],
  )

  expect(hashesInDoc).toStrictEqual(cspHashes)
})

Dependencies

  • ..
  • node:fs
  • node:path
  • vitest

Frequently Asked Questions

What does readme.spec.ts do?
readme.spec.ts is a source file in the vite codebase, written in typescript.
What does readme.spec.ts depend on?
readme.spec.ts imports 4 module(s): .., node:fs, node:path, vitest.
Where is readme.spec.ts in the architecture?
readme.spec.ts is located at packages/plugin-legacy/src/__tests__/readme.spec.ts (directory: packages/plugin-legacy/src/__tests__).

Analyze Your Own Codebase

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

Try Supermodel Free