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. 9 imports, 0 dependents.

File typescript OxideEngine PreProcessors 9 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  b45d6302_6e47_4739_6458_7a23608f0b01["index.test.ts"]
  9ffd1dda_9675_c514_373d_0f4ab4648249["utils.ts"]
  b45d6302_6e47_4739_6458_7a23608f0b01 --> 9ffd1dda_9675_c514_373d_0f4ab4648249
  b7531519_9055_fbfa_5f69_ebc8586b0422["candidate"]
  b45d6302_6e47_4739_6458_7a23608f0b01 --> b7531519_9055_fbfa_5f69_ebc8586b0422
  329ca5ee_2e24_1ec5_6818_8fdc3622dda9["retryAssertion"]
  b45d6302_6e47_4739_6458_7a23608f0b01 --> 329ca5ee_2e24_1ec5_6818_8fdc3622dda9
  f11e3be9_51f8_140b_68b0_f58ddd082595["test"]
  b45d6302_6e47_4739_6458_7a23608f0b01 --> f11e3be9_51f8_140b_68b0_f58ddd082595
  211db6bb_9759_d0cf_acda_36d7f5733ce2["dedent"]
  b45d6302_6e47_4739_6458_7a23608f0b01 --> 211db6bb_9759_d0cf_acda_36d7f5733ce2
  6697e014_f05e_326e_fc13_a0cc17f46c5d["node:os"]
  b45d6302_6e47_4739_6458_7a23608f0b01 --> 6697e014_f05e_326e_fc13_a0cc17f46c5d
  2a7660a5_3e09_bd74_37f0_e4e54bc64ce5["node:path"]
  b45d6302_6e47_4739_6458_7a23608f0b01 --> 2a7660a5_3e09_bd74_37f0_e4e54bc64ce5
  83f4eb5c_a623_9c4e_b3f7_d95e77d40d82["node:url"]
  b45d6302_6e47_4739_6458_7a23608f0b01 --> 83f4eb5c_a623_9c4e_b3f7_d95e77d40d82
  696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"]
  b45d6302_6e47_4739_6458_7a23608f0b01 --> 696bd648_5f24_1b59_8e8b_7a97a692869e
  style b45d6302_6e47_4739_6458_7a23608f0b01 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import dedent from 'dedent'
import os from 'node:os'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { describe } from 'vitest'
import { candidate, css, html, js, json, retryAssertion, test, ts, txt, yaml } from '../utils'

const __dirname = path.dirname(fileURLToPath(import.meta.url))

const STANDALONE_BINARY = (() => {
  switch (os.platform()) {
    case 'win32':
      return 'tailwindcss-windows-x64.exe'
    case 'darwin':
      return os.arch() === 'x64' ? 'tailwindcss-macos-x64' : 'tailwindcss-macos-arm64'
    case 'linux':
      return os.arch() === 'x64' ? 'tailwindcss-linux-x64' : 'tailwindcss-linux-arm64'
    default:
      throw new Error(`Unsupported platform: ${os.platform()} ${os.arch()}`)
  }
})()

describe.each([
  ['CLI', 'pnpm tailwindcss'],
  [
    'Standalone CLI',
    path.resolve(__dirname, `../../packages/@tailwindcss-standalone/dist/${STANDALONE_BINARY}`),
  ],
])('%s', (kind, command) => {
  test(
    'production build',
    {
      fs: {
        'package.json': json`{}`,
        'pnpm-workspace.yaml': yaml`
          #
          packages:
            - project-a
        `,
        'project-a/package.json': json`
          {
            "dependencies": {
              "tailwindcss": "workspace:^",
              "@tailwindcss/cli": "workspace:^"
            }
          }
        `,
        'project-a/index.html': html`
          <div
            class="underline 2xl:font-bold hocus:underline inverted:flex *:flex **:flex"
          ></div>
        `,
        'project-a/plugin.js': js`
          module.exports = function ({ addVariant }) {
            addVariant('inverted', '@media (inverted-colors: inverted)')
            addVariant('hocus', ['&:focus', '&:hover'])
          }
        `,
        'project-a/tailwind.config.js': js`
          module.exports = {
// ... (2552 more lines)

Domain

Subdomains

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, PreProcessors subdomain.
What functions are defined in index.test.ts?
index.test.ts defines 2 function(s): STANDALONE_BINARY, withBOM.
What does index.test.ts depend on?
index.test.ts imports 9 module(s): candidate, dedent, node:os, node:path, node:url, retryAssertion, test, utils.ts, and 1 more.
Where is index.test.ts in the architecture?
index.test.ts is located at integrations/cli/index.test.ts (domain: OxideEngine, subdomain: PreProcessors, directory: integrations/cli).

Analyze Your Own Codebase

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

Try Supermodel Free