args.test.ts — tailwindcss Source File
Architecture documentation for args.test.ts, a typescript file in the tailwindcss codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 3309a8f3_407e_4bea_ab9e_70e2950d42fa["args.test.ts"] 2dcceaf3_4383_df7d_023d_fa36fab3c61a["args.ts"] 3309a8f3_407e_4bea_ab9e_70e2950d42fa --> 2dcceaf3_4383_df7d_023d_fa36fab3c61a 7b2613af_eca0_b063_a0e3_ffec30cb1a12["args"] 3309a8f3_407e_4bea_ab9e_70e2950d42fa --> 7b2613af_eca0_b063_a0e3_ffec30cb1a12 696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"] 3309a8f3_407e_4bea_ab9e_70e2950d42fa --> 696bd648_5f24_1b59_8e8b_7a97a692869e style 3309a8f3_407e_4bea_ab9e_70e2950d42fa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { expect, it } from 'vitest'
import { args, type Arg } from './args'
it('should be possible to parse a single argument', () => {
expect(
args(
{
'--input': { type: 'string', description: 'Input file' },
},
['--input', 'input.css'],
),
).toMatchInlineSnapshot(`
{
"--input": "input.css",
"_": [],
}
`)
})
it('should fallback to the default value if no flag is passed', () => {
expect(
args(
{
'--input': { type: 'string', description: 'Input file', default: 'input.css' },
},
['--other'],
),
).toMatchInlineSnapshot(`
{
"--input": "input.css",
"_": [],
}
`)
})
it('should fallback to null if no flag is passed and no default value is provided', () => {
expect(
args(
{
'--input': { type: 'string', description: 'Input file' },
},
['--other'],
),
).toMatchInlineSnapshot(`
{
"--input": null,
"_": [],
}
`)
})
it('should be possible to parse a single argument using the shorthand alias', () => {
expect(
args(
{
'--input': { type: 'string', description: 'Input file', alias: '-i' },
},
['-i', 'input.css'],
),
).toMatchInlineSnapshot(`
// ... (64 more lines)
Domain
Source
Frequently Asked Questions
What does args.test.ts do?
args.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the UpgradeToolkit domain.
What does args.test.ts depend on?
args.test.ts imports 3 module(s): args, args.ts, vitest.
Where is args.test.ts in the architecture?
args.test.ts is located at packages/@tailwindcss-upgrade/src/utils/args.test.ts (domain: UpgradeToolkit, directory: packages/@tailwindcss-upgrade/src/utils).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free