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

license.spec.ts — vite Source File

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

Entity Profile

Dependency Diagram

graph LR
  3aa582d5_c9ec_eb91_8e01_d6fe91941f41["license.spec.ts"]
  45981d85_cbdd_e969_8c88_c17072ea0eda["build.ts"]
  3aa582d5_c9ec_eb91_8e01_d6fe91941f41 --> 45981d85_cbdd_e969_8c88_c17072ea0eda
  bbded320_f805_2b6e_3109_088d194024a2["build"]
  3aa582d5_c9ec_eb91_8e01_d6fe91941f41 --> bbded320_f805_2b6e_3109_088d194024a2
  6feed3e8_55b8_cce7_b5ef_e40b872585f7["node:url"]
  3aa582d5_c9ec_eb91_8e01_d6fe91941f41 --> 6feed3e8_55b8_cce7_b5ef_e40b872585f7
  6701bba9_3d8f_f5b8_c0a6_edc7752de5de["rollup"]
  3aa582d5_c9ec_eb91_8e01_d6fe91941f41 --> 6701bba9_3d8f_f5b8_c0a6_edc7752de5de
  a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"]
  3aa582d5_c9ec_eb91_8e01_d6fe91941f41 --> a340ba46_b2b7_3048_3bb3_6907a74c8464
  style 3aa582d5_c9ec_eb91_8e01_d6fe91941f41 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { fileURLToPath } from 'node:url'
import type { OutputAsset, RollupOutput } from 'rollup'
import { expect, test } from 'vitest'
import { build } from '../../build'

test('markdown', async () => {
  const result = (await build({
    root: fileURLToPath(new URL('./fixtures/license', import.meta.url)),
    logLevel: 'silent',
    build: {
      write: false,
      license: true,
    },
  })) as RollupOutput
  const licenseAsset = result.output.find(
    (asset) => asset.fileName === '.vite/license.md',
  ) as OutputAsset | undefined
  expect(licenseAsset).toBeDefined()
  expect(licenseAsset?.source).toMatchSnapshot()
})

test('json', async () => {
  const result = (await build({
    root: fileURLToPath(new URL('./fixtures/license', import.meta.url)),
    logLevel: 'silent',
    build: {
      write: false,
      license: {
        fileName: '.vite/license.json',
      },
    },
  })) as RollupOutput
  const licenseAsset = result.output.find(
    (asset) => asset.fileName === '.vite/license.json',
  ) as OutputAsset | undefined
  expect(licenseAsset).toBeDefined()
  expect(licenseAsset?.source).toMatchSnapshot()
})

Domain

Dependencies

Frequently Asked Questions

What does license.spec.ts do?
license.spec.ts is a source file in the vite codebase, written in typescript. It belongs to the ViteCore domain.
What does license.spec.ts depend on?
license.spec.ts imports 5 module(s): build, build.ts, node:url, rollup, vitest.
Where is license.spec.ts in the architecture?
license.spec.ts is located at packages/vite/src/node/__tests__/plugins/license.spec.ts (domain: ViteCore, directory: packages/vite/src/node/__tests__/plugins).

Analyze Your Own Codebase

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

Try Supermodel Free