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

utilities.test.ts — tailwindcss Source File

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

Entity Profile

Dependency Diagram

graph LR
  129992b6_bef1_d800_9f59_b3d6f6c7c8a1["utilities.test.ts"]
  cf14281b_29d9_c059_3148_2e2cc2fe19ae["run.ts"]
  129992b6_bef1_d800_9f59_b3d6f6c7c8a1 --> cf14281b_29d9_c059_3148_2e2cc2fe19ae
  4c014585_4ec9_378c_bc1a_9d4ad5c2708c["compileCss"]
  129992b6_bef1_d800_9f59_b3d6f6c7c8a1 --> 4c014585_4ec9_378c_bc1a_9d4ad5c2708c
  85b013b1_163d_9594_1737_4dd7f391d8ce["optimizeCss"]
  129992b6_bef1_d800_9f59_b3d6f6c7c8a1 --> 85b013b1_163d_9594_1737_4dd7f391d8ce
  613aea88_7231_059c_f480_39c6f1487e16["run"]
  129992b6_bef1_d800_9f59_b3d6f6c7c8a1 --> 613aea88_7231_059c_f480_39c6f1487e16
  2bc6f8eb_6339_d09c_79df_e9025a479c97["utilities.ts"]
  129992b6_bef1_d800_9f59_b3d6f6c7c8a1 --> 2bc6f8eb_6339_d09c_79df_e9025a479c97
  1edbc988_3b60_5ad0_3e4c_89aca8f06008["isValidFunctionalUtilityName"]
  129992b6_bef1_d800_9f59_b3d6f6c7c8a1 --> 1edbc988_3b60_5ad0_3e4c_89aca8f06008
  fcffa229_155b_fa67_4023_f4019f7075dc["isValidStaticUtilityName"]
  129992b6_bef1_d800_9f59_b3d6f6c7c8a1 --> fcffa229_155b_fa67_4023_f4019f7075dc
  696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"]
  129992b6_bef1_d800_9f59_b3d6f6c7c8a1 --> 696bd648_5f24_1b59_8e8b_7a97a692869e
  901927f2_bc06_7bba_3b59_6521372af070["."]
  129992b6_bef1_d800_9f59_b3d6f6c7c8a1 --> 901927f2_bc06_7bba_3b59_6521372af070
  style 129992b6_bef1_d800_9f59_b3d6f6c7c8a1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { describe, expect, test, vi } from 'vitest'
import { compile } from '.'
import { compileCss, optimizeCss, run } from './test-utils/run'
import { isValidFunctionalUtilityName, isValidStaticUtilityName } from './utilities'

const css = String.raw

test('sr-only', async () => {
  expect(await run(['sr-only'])).toMatchInlineSnapshot(`
    ".sr-only {
      clip-path: inset(50%);
      white-space: nowrap;
      border-width: 0;
      width: 1px;
      height: 1px;
      margin: -1px;
      padding: 0;
      position: absolute;
      overflow: hidden;
    }"
  `)
  expect(await run(['-sr-only', 'sr-only-[var(--value)]', 'sr-only/foo'])).toEqual('')
})

test('not-sr-only', async () => {
  expect(await run(['not-sr-only'])).toMatchInlineSnapshot(`
    ".not-sr-only {
      clip-path: none;
      white-space: normal;
      width: auto;
      height: auto;
      margin: 0;
      padding: 0;
      position: static;
      overflow: visible;
    }"
  `)
  expect(await run(['-not-sr-only', 'not-sr-only-[var(--value)]', 'not-sr-only/foo'])).toEqual('')
})

test('pointer-events', async () => {
  expect(await run(['pointer-events-none', 'pointer-events-auto'])).toMatchInlineSnapshot(`
    ".pointer-events-auto {
      pointer-events: auto;
    }

    .pointer-events-none {
      pointer-events: none;
    }"
  `)
  expect(
    await run([
      '-pointer-events-none',
      '-pointer-events-auto',
      'pointer-events-[var(--value)]',
      'pointer-events-none/foo',
    ]),
  ).toEqual('')
})

// ... (29879 more lines)

Domain

Frequently Asked Questions

What does utilities.test.ts do?
utilities.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the OxideEngine domain.
What does utilities.test.ts depend on?
utilities.test.ts imports 9 module(s): ., compileCss, isValidFunctionalUtilityName, isValidStaticUtilityName, optimizeCss, run, run.ts, utilities.ts, and 1 more.
Where is utilities.test.ts in the architecture?
utilities.test.ts is located at packages/tailwindcss/src/utilities.test.ts (domain: OxideEngine, directory: packages/tailwindcss/src).

Analyze Your Own Codebase

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

Try Supermodel Free