pmat 3.11.0

PMAT - Zero-config AI context generation and code quality toolkit (CLI, MCP, HTTP)
    /// Test: JSDoc comments should be extracted for enhanced context
    #[ignore = "JSDoc extraction not yet implemented"]
    #[test]
    fn test_jsdoc_extraction_for_enhanced_context() {
        // NOTE: This test is designed to FAIL initially as JSDoc extraction is not yet implemented
        let _code = r#"
            /**
             * Calculates the total price including tax
             * @param {number} basePrice - The base price before tax
             * @param {number} taxRate - The tax rate as a decimal (e.g., 0.08 for 8%)
             * @param {boolean} includeShipping - Whether to include shipping costs
             * @returns {number} The total price including tax and optional shipping
             * @example
             * const total = calculateTotal(100, 0.08, true);
             * // Returns: 118 (100 + 8% tax + 10 shipping)
             */
            function calculateTotal(basePrice, taxRate, includeShipping = false) {
                let total = basePrice * (1 + taxRate);
                if (includeShipping) {
                    total += 10; // Standard shipping
                }
                return total;
            }

            /**
             * User account management service
             * @class UserService
             * @description Handles all user-related operations including authentication and profile management
             */
            class UserService {
                /**
                 * Authenticates a user with email and password
                 * @async
                 * @param {string} email - User's email address
                 * @param {string} password - User's password
                 * @returns {Promise<{token: string, user: User}>} Authentication result
                 * @throws {AuthenticationError} When credentials are invalid
                 */
                async authenticate(email, password) {
                    // Implementation
                    return { token: 'abc123', user: { email } };
                }
            }
        "#;

        // This test should initially FAIL - we expect JSDoc extraction to be implemented
        // When properly implemented, function items should include JSDoc information
        let _expected_jsdoc_info = [
            ("calculateTotal", "Calculates the total price including tax"),
            (
                "authenticate",
                "Authenticates a user with email and password",
            ),
        ];

        // TODO: Implement JSDoc parsing in EnhancedTypeScriptVisitor
        // For now, this test serves as a specification for the feature
        panic!("JSDoc extraction not yet implemented - this test defines the requirement");
    }