value-parser.test.ts — tailwindcss Source File
Architecture documentation for value-parser.test.ts, a typescript file in the tailwindcss codebase. 7 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 40dcb117_790e_1d9b_40d0_9d511ef8ddd2["value-parser.test.ts"] d9175aea_5971_a6c1_773d_004ce3789372["value-parser.ts"] 40dcb117_790e_1d9b_40d0_9d511ef8ddd2 --> d9175aea_5971_a6c1_773d_004ce3789372 49a8c506_c50e_ed4b_5a0e_0393edae2b6f["parse"] 40dcb117_790e_1d9b_40d0_9d511ef8ddd2 --> 49a8c506_c50e_ed4b_5a0e_0393edae2b6f d6cf80a6_8130_7069_e60d_09156f156b67["toCss"] 40dcb117_790e_1d9b_40d0_9d511ef8ddd2 --> d6cf80a6_8130_7069_e60d_09156f156b67 1b8f1c54_b1e9_e18d_0719_b7ad92808185["walk.ts"] 40dcb117_790e_1d9b_40d0_9d511ef8ddd2 --> 1b8f1c54_b1e9_e18d_0719_b7ad92808185 4982d9ce_98d4_85d9_44af_7cc47b93c482["walk"] 40dcb117_790e_1d9b_40d0_9d511ef8ddd2 --> 4982d9ce_98d4_85d9_44af_7cc47b93c482 47187d1b_a6f7_f734_0752_446b87b5cd9e["WalkAction"] 40dcb117_790e_1d9b_40d0_9d511ef8ddd2 --> 47187d1b_a6f7_f734_0752_446b87b5cd9e f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3["vitest"] 40dcb117_790e_1d9b_40d0_9d511ef8ddd2 --> f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3 style 40dcb117_790e_1d9b_40d0_9d511ef8ddd2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { describe, expect, it } from 'vitest'
import { parse, toCss } from './value-parser'
import { walk, WalkAction } from './walk'
describe('parse', () => {
it('should parse a value', () => {
expect(parse('123px')).toEqual([{ kind: 'word', value: '123px' }])
})
it('should parse a string value', () => {
expect(parse("'hello world'")).toEqual([{ kind: 'word', value: "'hello world'" }])
})
it('should parse a list', () => {
expect(parse('hello world')).toEqual([
{ kind: 'word', value: 'hello' },
{ kind: 'separator', value: ' ' },
{ kind: 'word', value: 'world' },
])
})
it('should parse a string containing parentheses', () => {
expect(parse("'hello ( world )'")).toEqual([{ kind: 'word', value: "'hello ( world )'" }])
})
it('should parse a function with no arguments', () => {
expect(parse('theme()')).toEqual([{ kind: 'function', value: 'theme', nodes: [] }])
})
it('should parse a function with a single argument', () => {
expect(parse('theme(foo)')).toEqual([
{ kind: 'function', value: 'theme', nodes: [{ kind: 'word', value: 'foo' }] },
])
})
it('should parse a function with a single string argument', () => {
expect(parse("theme('foo')")).toEqual([
{ kind: 'function', value: 'theme', nodes: [{ kind: 'word', value: "'foo'" }] },
])
})
it('should parse a function with multiple arguments', () => {
expect(parse('theme(foo, bar)')).toEqual([
{
kind: 'function',
value: 'theme',
nodes: [
{ kind: 'word', value: 'foo' },
{ kind: 'separator', value: ', ' },
{ kind: 'word', value: 'bar' },
],
},
])
})
it('should parse a function with multiple arguments across lines', () => {
expect(parse('theme(\n\tfoo,\n\tbar\n)')).toEqual([
{
kind: 'function',
value: 'theme',
// ... (160 more lines)
Domain
Dependencies
Source
Frequently Asked Questions
What does value-parser.test.ts do?
value-parser.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the Oxide domain.
What does value-parser.test.ts depend on?
value-parser.test.ts imports 7 module(s): WalkAction, parse, toCss, value-parser.ts, vitest, walk, walk.ts.
Where is value-parser.test.ts in the architecture?
value-parser.test.ts is located at packages/tailwindcss/src/value-parser.test.ts (domain: Oxide, directory: packages/tailwindcss/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free