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.

File typescript Oxide 3 imports

Entity Profile

Dependency Diagram

graph LR
  d474bb64_7d81_7492_1915_6e383a2967c9["plugins.test.ts"]
  7600373a_3645_efb1_bcbb_e7c3fcb813ac["utils.ts"]
  d474bb64_7d81_7492_1915_6e383a2967c9 --> 7600373a_3645_efb1_bcbb_e7c3fcb813ac
  ce18acb2_833c_61a7_166d_0fd7613ce1c0["candidate"]
  d474bb64_7d81_7492_1915_6e383a2967c9 --> ce18acb2_833c_61a7_166d_0fd7613ce1c0
  44ea7d66_6ac1_15b9_1cc7_d01c23a5ee04["test"]
  d474bb64_7d81_7492_1915_6e383a2967c9 --> 44ea7d66_6ac1_15b9_1cc7_d01c23a5ee04
  style d474bb64_7d81_7492_1915_6e383a2967c9 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 Oxide 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: Oxide, directory: integrations/cli).

Analyze Your Own Codebase

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

Try Supermodel Free