Home / File/ transform-import.test.ts — ui Source File

transform-import.test.ts — ui Source File

Architecture documentation for transform-import.test.ts, a typescript file in the ui codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  9c4179cb_3c5f_8520_0800_9155c8aa9b05["transform-import.test.ts"]
  646bd874_990a_e30f_0d03_073229dd52ad["index.ts"]
  9c4179cb_3c5f_8520_0800_9155c8aa9b05 --> 646bd874_990a_e30f_0d03_073229dd52ad
  7d044675_0040_220b_aa9c_215286f03b0a["transform"]
  9c4179cb_3c5f_8520_0800_9155c8aa9b05 --> 7d044675_0040_220b_aa9c_215286f03b0a
  c8d55bee_7008_1e1f_317b_8dc47b31b6a8["vitest"]
  9c4179cb_3c5f_8520_0800_9155c8aa9b05 --> c8d55bee_7008_1e1f_317b_8dc47b31b6a8
  style 9c4179cb_3c5f_8520_0800_9155c8aa9b05 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { expect, test } from "vitest"

import { transform } from "../../src/utils/transformers"


test('transform nested workspace folder for utils, website/src/utils', async () => {
  expect(
    await transform({
      filename: "test.ts",

      raw: `import { Button } from "website/src/components/ui/button"
      import { Box } from "website/src/components/box"
      import { cn } from "website/src/utils"
    `,
      config: {
        tsx: true,
        tailwind: {
          baseColor: "neutral",
          cssVariables: true,
        },
        aliases: {
          components: "website/src/components",
          lib: "website/src/lib",
          utils: "website/src/utils",
        },
      },
    })
  ).toMatchInlineSnapshot(`
    "import { Button } from "website/src/components/ui/button"
          import { Box } from "website/src/components/box"
          import { cn } from "website/src/utils"
        "
  `)

})

test("transform import", async () => {
  expect(
    await transform({
      filename: "test.ts",
      raw: `import * as React from "react"
import { Foo } from "bar"
    import { Button } from "@/registry/new-york/ui/button"
    import { Label} from "ui/label"
    import { Box } from "@/registry/new-york/box"

    import { cn } from "@/lib/utils"
    `,
      config: {
        tsx: true,
        tailwind: {
          baseColor: "neutral",
          cssVariables: true,
        },
        aliases: {
          components: "@/components",
          utils: "@/lib/utils",
        },
      },
    })
// ... (289 more lines)

Dependencies

Frequently Asked Questions

What does transform-import.test.ts do?
transform-import.test.ts is a source file in the ui codebase, written in typescript. It belongs to the FrameworkTooling domain.
What does transform-import.test.ts depend on?
transform-import.test.ts imports 3 module(s): index.ts, transform, vitest.
Where is transform-import.test.ts in the architecture?
transform-import.test.ts is located at packages/shadcn/test/utils/transform-import.test.ts (domain: FrameworkTooling, directory: packages/shadcn/test/utils).

Analyze Your Own Codebase

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

Try Supermodel Free