migrate-handle-empty-arbitrary-values.test.ts — tailwindcss Source File
Architecture documentation for migrate-handle-empty-arbitrary-values.test.ts, a typescript file in the tailwindcss codebase. 7 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 832ea6ef_9a32_da8d_2421_b9aa3cf2d588["migrate-handle-empty-arbitrary-values.test.ts"] fff09679_e13c_392d_23bb_cebc04ddb008["version.ts"] 832ea6ef_9a32_da8d_2421_b9aa3cf2d588 --> fff09679_e13c_392d_23bb_cebc04ddb008 b2513b9e_5a88_8d31_01d5_feda722b6dae["migrate-handle-empty-arbitrary-values.ts"] 832ea6ef_9a32_da8d_2421_b9aa3cf2d588 --> b2513b9e_5a88_8d31_01d5_feda722b6dae 7ea9e5e1_61ed_234e_08e0_af2f43645d35["migrateEmptyArbitraryValues"] 832ea6ef_9a32_da8d_2421_b9aa3cf2d588 --> 7ea9e5e1_61ed_234e_08e0_af2f43645d35 d13948d4_4434_bf78_9916_1ba327123c94["migrate-prefix.ts"] 832ea6ef_9a32_da8d_2421_b9aa3cf2d588 --> d13948d4_4434_bf78_9916_1ba327123c94 087d2224_9aa6_c6e5_3a75_d99cf251cb04["migratePrefix"] 832ea6ef_9a32_da8d_2421_b9aa3cf2d588 --> 087d2224_9aa6_c6e5_3a75_d99cf251cb04 92f2d961_72a4_d195_92d7_2e66972f8894["node"] 832ea6ef_9a32_da8d_2421_b9aa3cf2d588 --> 92f2d961_72a4_d195_92d7_2e66972f8894 696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"] 832ea6ef_9a32_da8d_2421_b9aa3cf2d588 --> 696bd648_5f24_1b59_8e8b_7a97a692869e style 832ea6ef_9a32_da8d_2421_b9aa3cf2d588 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { __unstable__loadDesignSystem } from '@tailwindcss/node'
import { expect, test, vi } from 'vitest'
import * as versions from '../../utils/version'
import { migrateEmptyArbitraryValues } from './migrate-handle-empty-arbitrary-values'
import { migratePrefix } from './migrate-prefix'
vi.spyOn(versions, 'isMajor').mockReturnValue(true)
test.each([
['group-[]:flex', 'group-[&]:flex'],
['group-[]/name:flex', 'group-[&]/name:flex'],
['peer-[]:flex', 'peer-[&]:flex'],
['peer-[]/name:flex', 'peer-[&]/name:flex'],
])('%s => %s (%#)', async (candidate, result) => {
let designSystem = await __unstable__loadDesignSystem('@import "tailwindcss";', {
base: __dirname,
})
expect(migrateEmptyArbitraryValues(designSystem, {}, candidate)).toEqual(result)
})
test.each([
['group-[]:tw-flex', 'tw:group-[&]:flex'],
['group-[]/name:tw-flex', 'tw:group-[&]/name:flex'],
['peer-[]:tw-flex', 'tw:peer-[&]:flex'],
['peer-[]/name:tw-flex', 'tw:peer-[&]/name:flex'],
])('%s => %s (%#)', async (candidate, result) => {
let designSystem = await __unstable__loadDesignSystem('@import "tailwindcss" prefix(tw);', {
base: __dirname,
})
expect(
[migrateEmptyArbitraryValues, migratePrefix].reduce(
(acc, step) => step(designSystem, { prefix: 'tw-' }, acc),
candidate,
),
).toEqual(result)
})
Domain
Dependencies
Source
Frequently Asked Questions
What does migrate-handle-empty-arbitrary-values.test.ts do?
migrate-handle-empty-arbitrary-values.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the UpgradeToolkit domain.
What does migrate-handle-empty-arbitrary-values.test.ts depend on?
migrate-handle-empty-arbitrary-values.test.ts imports 7 module(s): migrate-handle-empty-arbitrary-values.ts, migrate-prefix.ts, migrateEmptyArbitraryValues, migratePrefix, node, version.ts, vitest.
Where is migrate-handle-empty-arbitrary-values.test.ts in the architecture?
migrate-handle-empty-arbitrary-values.test.ts is located at packages/@tailwindcss-upgrade/src/codemods/template/migrate-handle-empty-arbitrary-values.test.ts (domain: UpgradeToolkit, directory: packages/@tailwindcss-upgrade/src/codemods/template).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free