css-parser.test.ts — tailwindcss Source File
Architecture documentation for css-parser.test.ts, a typescript file in the tailwindcss codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 67ea796d_a9b8_333b_be64_d3675f661dd6["css-parser.test.ts"] 54851997_7544_bab2_96ab_548e5f5df205["css-parser.ts"] 67ea796d_a9b8_333b_be64_d3675f661dd6 --> 54851997_7544_bab2_96ab_548e5f5df205 696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"] 67ea796d_a9b8_333b_be64_d3675f661dd6 --> 696bd648_5f24_1b59_8e8b_7a97a692869e style 67ea796d_a9b8_333b_be64_d3675f661dd6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { describe, expect, it } from 'vitest'
import * as CSS from './css-parser'
const css = String.raw
describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => {
function parse(string: string) {
return CSS.parse(string.replaceAll(/\r?\n/g, lineEndings === 'Windows' ? '\r\n' : '\n'))
}
function parseWithLoc(string: string) {
return CSS.parse(string.replaceAll(/\r?\n/g, lineEndings === 'Windows' ? '\r\n' : '\n'), {
from: 'input.css',
})
}
describe('comments', () => {
it('should parse a comment and ignore it', () => {
expect(
parse(css`
/*Hello, world!*/
`),
).toEqual([])
})
it('should parse a comment with an escaped ending and ignore it', () => {
expect(
parse(css`
/*Hello, \*\/ world!*/
`),
).toEqual([])
})
it('should parse a comment inside of a selector and ignore it', () => {
expect(
parse(css`
.foo {
/*Example comment*/
}
`),
).toEqual([
{
kind: 'rule',
selector: '.foo',
nodes: [],
},
])
})
it('should remove comments in between selectors while maintaining the correct whitespace', () => {
expect(
parse(css`
.foo/*.bar*/.baz {
}
.foo/*.bar*//*.baz*/.qux
{
}
.foo/*.bar*/ /*.baz*/.qux {
/* ^ whitespace */
}
// ... (1252 more lines)
Domain
Dependencies
- css-parser.ts
- vitest
Source
Frequently Asked Questions
What does css-parser.test.ts do?
css-parser.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the OxideEngine domain.
What does css-parser.test.ts depend on?
css-parser.test.ts imports 2 module(s): css-parser.ts, vitest.
Where is css-parser.test.ts in the architecture?
css-parser.test.ts is located at packages/tailwindcss/src/css-parser.test.ts (domain: OxideEngine, directory: packages/tailwindcss/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free