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 Oxide PreProcessors 9 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  94e55251_072a_af69_4fc9_5d2d5b700931["index.test.ts"]
  7600373a_3645_efb1_bcbb_e7c3fcb813ac["utils.ts"]
  94e55251_072a_af69_4fc9_5d2d5b700931 --> 7600373a_3645_efb1_bcbb_e7c3fcb813ac
  ce18acb2_833c_61a7_166d_0fd7613ce1c0["candidate"]
  94e55251_072a_af69_4fc9_5d2d5b700931 --> ce18acb2_833c_61a7_166d_0fd7613ce1c0
  22238dde_7df7_64d5_1424_a93cf2421b15["retryAssertion"]
  94e55251_072a_af69_4fc9_5d2d5b700931 --> 22238dde_7df7_64d5_1424_a93cf2421b15
  44ea7d66_6ac1_15b9_1cc7_d01c23a5ee04["test"]
  94e55251_072a_af69_4fc9_5d2d5b700931 --> 44ea7d66_6ac1_15b9_1cc7_d01c23a5ee04
  8ff4bb92_b963_efb6_cca2_1da4b3ea849b["dedent"]
  94e55251_072a_af69_4fc9_5d2d5b700931 --> 8ff4bb92_b963_efb6_cca2_1da4b3ea849b
  05950b06_34e4_40bd_2622_1cfda03546ff["node:os"]
  94e55251_072a_af69_4fc9_5d2d5b700931 --> 05950b06_34e4_40bd_2622_1cfda03546ff
  89aef3dd_1eed_c141_d425_b8949215a653["node:path"]
  94e55251_072a_af69_4fc9_5d2d5b700931 --> 89aef3dd_1eed_c141_d425_b8949215a653
  8454872a_1bfa_3cb3_db8f_6d2e7e422a55["node:url"]
  94e55251_072a_af69_4fc9_5d2d5b700931 --> 8454872a_1bfa_3cb3_db8f_6d2e7e422a55
  f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3["vitest"]
  94e55251_072a_af69_4fc9_5d2d5b700931 --> f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3
  style 94e55251_072a_af69_4fc9_5d2d5b700931 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 Oxide 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: Oxide, 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