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

index.test.ts — tailwindcss Source File

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

Entity Profile

Dependency Diagram

graph LR
  af7b20f1_b2e9_666f_b07d_f7bed6306aad["index.test.ts"]
  af1a6ece_0432_a556_fd63_8cb4a91f12ad["plugin-api.ts"]
  af7b20f1_b2e9_666f_b07d_f7bed6306aad --> af1a6ece_0432_a556_fd63_8cb4a91f12ad
  fda9325c_b5ff_9f58_5fbb_98511cb0b478["plugin.ts"]
  af7b20f1_b2e9_666f_b07d_f7bed6306aad --> fda9325c_b5ff_9f58_5fbb_98511cb0b478
  cf14281b_29d9_c059_3148_2e2cc2fe19ae["run.ts"]
  af7b20f1_b2e9_666f_b07d_f7bed6306aad --> cf14281b_29d9_c059_3148_2e2cc2fe19ae
  4c014585_4ec9_378c_bc1a_9d4ad5c2708c["compileCss"]
  af7b20f1_b2e9_666f_b07d_f7bed6306aad --> 4c014585_4ec9_378c_bc1a_9d4ad5c2708c
  85b013b1_163d_9594_1737_4dd7f391d8ce["optimizeCss"]
  af7b20f1_b2e9_666f_b07d_f7bed6306aad --> 85b013b1_163d_9594_1737_4dd7f391d8ce
  613aea88_7231_059c_f480_39c6f1487e16["run"]
  af7b20f1_b2e9_666f_b07d_f7bed6306aad --> 613aea88_7231_059c_f480_39c6f1487e16
  6390fa3b_300d_6028_9e96_c869157db42d["node:fs"]
  af7b20f1_b2e9_666f_b07d_f7bed6306aad --> 6390fa3b_300d_6028_9e96_c869157db42d
  2a7660a5_3e09_bd74_37f0_e4e54bc64ce5["node:path"]
  af7b20f1_b2e9_666f_b07d_f7bed6306aad --> 2a7660a5_3e09_bd74_37f0_e4e54bc64ce5
  696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"]
  af7b20f1_b2e9_666f_b07d_f7bed6306aad --> 696bd648_5f24_1b59_8e8b_7a97a692869e
  901927f2_bc06_7bba_3b59_6521372af070["."]
  af7b20f1_b2e9_666f_b07d_f7bed6306aad --> 901927f2_bc06_7bba_3b59_6521372af070
  style af7b20f1_b2e9_666f_b07d_f7bed6306aad fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import fs from 'node:fs'
import path from 'node:path'
import { describe, expect, it, test } from 'vitest'
import { compile, Features, Polyfills } from '.'
import type { PluginAPI } from './compat/plugin-api'
import plugin from './plugin'
import { compileCss, optimizeCss, run } from './test-utils/run'

const css = String.raw

describe('compiling CSS', () => {
  test('`@tailwind utilities` is replaced with the generated utility classes', async () => {
    expect(
      await compileCss(
        css`
          @theme {
            --color-black: #000;
            --breakpoint-md: 768px;
          }

          @layer utilities {
            @tailwind utilities;
          }
        `,
        ['flex', 'md:grid', 'hover:underline', 'dark:bg-black'],
      ),
    ).toMatchInlineSnapshot(`
      ":root, :host {
        --color-black: #000;
      }

      @layer utilities {
        .flex {
          display: flex;
        }

        @media (hover: hover) {
          .hover\\:underline:hover {
            text-decoration-line: underline;
          }
        }

        @media (min-width: 768px) {
          .md\\:grid {
            display: grid;
          }
        }

        @media (prefers-color-scheme: dark) {
          .dark\\:bg-black {
            background-color: var(--color-black);
          }
        }
      }"
    `)
  })

  test('that only CSS variables are allowed', () => {
    return expect(
      compileCss(
// ... (6208 more lines)

Domain

Dependencies

Frequently Asked Questions

What does index.test.ts do?
index.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the OxideEngine domain.
What does index.test.ts depend on?
index.test.ts imports 10 module(s): ., compileCss, node:fs, node:path, optimizeCss, plugin-api.ts, plugin.ts, run, and 2 more.
Where is index.test.ts in the architecture?
index.test.ts is located at packages/tailwindcss/src/index.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