Home / File/ intellisense.test.ts — tailwindcss Source File

intellisense.test.ts — tailwindcss Source File

Architecture documentation for intellisense.test.ts, a typescript file in the tailwindcss codebase. 8 imports, 0 dependents.

File typescript OxideEngine Extractor 8 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  98e770dc_a4fd_a907_52e6_945a07710d34["intellisense.test.ts"]
  42640952_ea63_55f1_1ff1_00816e2980ae["ast.ts"]
  98e770dc_a4fd_a907_52e6_945a07710d34 --> 42640952_ea63_55f1_1ff1_00816e2980ae
  c203f636_607a_d332_b4c5_6a40c108f778["decl"]
  98e770dc_a4fd_a907_52e6_945a07710d34 --> c203f636_607a_d332_b4c5_6a40c108f778
  66319c06_7c38_f9ea_4bf0_2a0e18bac1a4["rule"]
  98e770dc_a4fd_a907_52e6_945a07710d34 --> 66319c06_7c38_f9ea_4bf0_2a0e18bac1a4
  fda9325c_b5ff_9f58_5fbb_98511cb0b478["plugin.ts"]
  98e770dc_a4fd_a907_52e6_945a07710d34 --> fda9325c_b5ff_9f58_5fbb_98511cb0b478
  80295787_127f_69e6_91b3_4bea3a484544["theme.ts"]
  98e770dc_a4fd_a907_52e6_945a07710d34 --> 80295787_127f_69e6_91b3_4bea3a484544
  e64872c9_9835_78a8_455b_ad5e699f9543["ThemeOptions"]
  98e770dc_a4fd_a907_52e6_945a07710d34 --> e64872c9_9835_78a8_455b_ad5e699f9543
  696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"]
  98e770dc_a4fd_a907_52e6_945a07710d34 --> 696bd648_5f24_1b59_8e8b_7a97a692869e
  901927f2_bc06_7bba_3b59_6521372af070["."]
  98e770dc_a4fd_a907_52e6_945a07710d34 --> 901927f2_bc06_7bba_3b59_6521372af070
  style 98e770dc_a4fd_a907_52e6_945a07710d34 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { expect, test } from 'vitest'
import { __unstable__loadDesignSystem } from '.'
import { decl, rule } from './ast'
import plugin from './plugin'
import { ThemeOptions } from './theme'

const css = String.raw

function loadDesignSystem() {
  return __unstable__loadDesignSystem(`
    @theme {
      --spacing: 0.25rem;
      --colors-red-500: red;
      --colors-blue-500: blue;
      --breakpoint-sm: 640px;
      --aspect-video: 16 / 9;
      --font-sans: sans-serif;
      --font-weight-superbold: 900;
      --text-xs: 0.75rem;
      --text-xs--line-height: 1rem;
      --perspective-dramatic: 100px;
      --perspective-normal: 500px;
      --opacity-background: 0.3;
      --drop-shadow-sm: 0 1px 1px rgb(0 0 0 / 0.05);
      --inset-shadow-sm: inset 0 1px 1px rgb(0 0 0 / 0.05);
      --font-weight-bold: 700;
      --container-md: 768px;
      --container-lg: 1024px;
    }
  `)
}

test('getClassList', async () => {
  let design = await loadDesignSystem()
  let classList = design.getClassList()
  let classNames = classList.flatMap(([name, meta]) => [
    name,
    ...meta.modifiers.map((m) => `${name}/${m}`),
  ])

  expect(classNames).toMatchSnapshot()
})

test('Spacing utilities do not suggest bare values when not using the multiplier-based spacing scale', async () => {
  let design = await loadDesignSystem()

  // Remove spacing scale
  design.theme.clearNamespace('--spacing', ThemeOptions.NONE)

  let classList = design.getClassList()
  let classNames = classList.flatMap(([name, meta]) => [
    name,
    ...meta.modifiers.map((m) => `${name}/${m}`),
  ])

  expect(classNames).not.toContain('p-0')
  expect(classNames).not.toContain('p-1')
  expect(classNames).not.toContain('p-2')
  expect(classNames).not.toContain('p-3')
  expect(classNames).not.toContain('p-4')
// ... (745 more lines)

Domain

Subdomains

Functions

Frequently Asked Questions

What does intellisense.test.ts do?
intellisense.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the OxideEngine domain, Extractor subdomain.
What functions are defined in intellisense.test.ts?
intellisense.test.ts defines 1 function(s): loadDesignSystem.
What does intellisense.test.ts depend on?
intellisense.test.ts imports 8 module(s): ., ThemeOptions, ast.ts, decl, plugin.ts, rule, theme.ts, vitest.
Where is intellisense.test.ts in the architecture?
intellisense.test.ts is located at packages/tailwindcss/src/intellisense.test.ts (domain: OxideEngine, subdomain: Extractor, directory: packages/tailwindcss/src).

Analyze Your Own Codebase

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

Try Supermodel Free