Home / Function/ test_js_syntax() — tailwindcss Function Reference

test_js_syntax() — tailwindcss Function Reference

Architecture documentation for the test_js_syntax() function in mod.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  62675fc7_a992_51d3_c2bc_c33bbd6e1591["test_js_syntax()"]
  322a5768_e6e0_c5e9_b1c2_7c6638e21f71["assert_extract_sorted_candidates()"]
  62675fc7_a992_51d3_c2bc_c33bbd6e1591 -->|calls| 322a5768_e6e0_c5e9_b1c2_7c6638e21f71
  style 62675fc7_a992_51d3_c2bc_c33bbd6e1591 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/mod.rs lines 755–785

    fn test_js_syntax() {
        for (input, expected) in [
            // String
            (
                r#"let classes = 'flex items-center';"#,
                vec!["let", "classes", "flex", "items-center"],
            ),
            // Array
            (
                r#"let classes = ['flex', 'items-center'];"#,
                vec!["let", "classes", "flex", "items-center"],
            ),
            // Minified array
            (
                r#"let classes = ['flex','items-center'];"#,
                vec!["let", "classes", "flex", "items-center"],
            ),
            // Function call
            (
                r#"let classes = something('flex');"#,
                vec!["let", "classes", "flex"],
            ),
            // Function call in array
            (
                r#"let classes = [wrapper('flex')]"#,
                vec!["let", "classes", "flex"],
            ),
        ] {
            assert_extract_sorted_candidates(input, expected);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does test_js_syntax() do?
test_js_syntax() is a function in the tailwindcss codebase.
What does test_js_syntax() call?
test_js_syntax() calls 1 function(s): assert_extract_sorted_candidates.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free