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

plugins.test.ts — tailwindcss Source File

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

Entity Profile

Dependency Diagram

graph LR
  30f4ee71_16dc_304c_0db5_d5d79883419a["plugins.test.ts"]
  9ffd1dda_9675_c514_373d_0f4ab4648249["utils.ts"]
  30f4ee71_16dc_304c_0db5_d5d79883419a --> 9ffd1dda_9675_c514_373d_0f4ab4648249
  b7531519_9055_fbfa_5f69_ebc8586b0422["candidate"]
  30f4ee71_16dc_304c_0db5_d5d79883419a --> b7531519_9055_fbfa_5f69_ebc8586b0422
  f11e3be9_51f8_140b_68b0_f58ddd082595["test"]
  30f4ee71_16dc_304c_0db5_d5d79883419a --> f11e3be9_51f8_140b_68b0_f58ddd082595
  style 30f4ee71_16dc_304c_0db5_d5d79883419a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { candidate, css, html, json, test } from '../utils'

test(
  'builds the `@tailwindcss/typography` plugin utilities',
  {
    fs: {
      'package.json': json`
        {
          "dependencies": {
            "@tailwindcss/typography": "^0.5.14",
            "tailwindcss": "workspace:^",
            "@tailwindcss/cli": "workspace:^"
          }
        }
      `,
      'index.html': html`
        <div className="prose prose-stone prose-invert">
          <h1>Headline</h1>
          <p>
            Until now, trying to style an article, document, or blog post with Tailwind has been a
            tedious task that required a keen eye for typography and a lot of complex custom CSS.
          </p>
        </div>
      `,
      'src/index.css': css`
        @import 'tailwindcss';
        @plugin '@tailwindcss/typography';
      `,
    },
  },
  async ({ fs, exec, expect }) => {
    await exec('pnpm tailwindcss --input src/index.css --output dist/out.css')

    // Verify that `prose-stone` is defined before `prose-invert`
    {
      let contents = await fs.read('dist/out.css')
      let proseInvertIdx = contents.indexOf('.prose-invert')
      let proseStoneIdx = contents.indexOf('.prose-stone')

      expect(proseStoneIdx).toBeLessThan(proseInvertIdx)
    }

    await fs.expectFileToContain('dist/out.css', [
      candidate`prose`,
      ':where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *))',
      ':where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *))',
    ])
  },
)

test(
  'builds the `@tailwindcss/forms` plugin utilities',
  {
    fs: {
      'package.json': json`
        {
          "dependencies": {
            "@tailwindcss/forms": "^0.5.7",
            "tailwindcss": "workspace:^",
            "@tailwindcss/cli": "workspace:^"
// ... (150 more lines)

Domain

Dependencies

Frequently Asked Questions

What does plugins.test.ts do?
plugins.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the OxideEngine domain.
What does plugins.test.ts depend on?
plugins.test.ts imports 3 module(s): candidate, test, utils.ts.
Where is plugins.test.ts in the architecture?
plugins.test.ts is located at integrations/cli/plugins.test.ts (domain: OxideEngine, directory: integrations/cli).

Analyze Your Own Codebase

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

Try Supermodel Free