transform-rsc.test.ts — ui Source File
Architecture documentation for transform-rsc.test.ts, a typescript file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 775d3db5_cfaf_442b_0f91_6b49e492ac80["transform-rsc.test.ts"] 646bd874_990a_e30f_0d03_073229dd52ad["index.ts"] 775d3db5_cfaf_442b_0f91_6b49e492ac80 --> 646bd874_990a_e30f_0d03_073229dd52ad 7d044675_0040_220b_aa9c_215286f03b0a["transform"] 775d3db5_cfaf_442b_0f91_6b49e492ac80 --> 7d044675_0040_220b_aa9c_215286f03b0a c8d55bee_7008_1e1f_317b_8dc47b31b6a8["vitest"] 775d3db5_cfaf_442b_0f91_6b49e492ac80 --> c8d55bee_7008_1e1f_317b_8dc47b31b6a8 style 775d3db5_cfaf_442b_0f91_6b49e492ac80 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { expect, test } from "vitest"
import { transform } from "../../src/utils/transformers"
test("transform rsc", async () => {
expect(
await transform({
filename: "test.ts",
raw: `import * as React from "react"
import { Foo } from "bar"
`,
config: {
tsx: true,
rsc: true,
},
})
).toMatchSnapshot()
expect(
await transform({
filename: "test.ts",
raw: `"use client"
import * as React from "react"
import { Foo } from "bar"
`,
config: {
tsx: true,
rsc: true,
},
})
).toMatchSnapshot()
expect(
await transform({
filename: "test.ts",
raw: `"use client"
import * as React from "react"
import { Foo } from "bar"
`,
config: {
tsx: true,
rsc: false,
},
})
).toMatchSnapshot()
expect(
await transform({
filename: "test.ts",
raw: `"use foo"
import * as React from "react"
import { Foo } from "bar"
"use client"
`,
config: {
tsx: true,
rsc: false,
},
})
).toMatchSnapshot()
expect(
await transform({
filename: "test.ts",
raw: `'use client'
import * as React from 'react'
import { Foo } from 'bar'
`,
config: {
tsx: true,
rsc: true,
},
})
).toMatchSnapshot()
expect(
await transform({
filename: "test.ts",
raw: `'use client'
import * as React from 'react'
import { Foo } from 'bar'
`,
config: {
tsx: true,
rsc: false,
},
})
).toMatchSnapshot()
expect(
await transform({
filename: "test.ts",
raw: `'use foo'
import * as React from 'react'
import { Foo } from 'bar'
'use client'
`,
config: {
tsx: true,
rsc: false,
},
})
).toMatchSnapshot()
})
Domain
Source
Frequently Asked Questions
What does transform-rsc.test.ts do?
transform-rsc.test.ts is a source file in the ui codebase, written in typescript. It belongs to the FrameworkTooling domain.
What does transform-rsc.test.ts depend on?
transform-rsc.test.ts imports 3 module(s): index.ts, transform, vitest.
Where is transform-rsc.test.ts in the architecture?
transform-rsc.test.ts is located at packages/shadcn/test/utils/transform-rsc.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