codeflash-internal/django/aiservice/testgen/prompts/javascript/execute_user_prompt.md
2026-01-14 22:15:27 -08:00

942 B

Using the {test_framework} testing framework, write a test suite for the following JavaScript function.

Function to Test:

{function_code}

Template to Follow:

// imports
const {{ {function_name} }} = require('{module_path}');

// unit tests
describe('{function_name}', () => {{
    // Basic Test Cases
    describe('Basic functionality', () => {{
        test('should handle normal input', () => {{
            // Test implementation
        }});
    }});

    // Edge Test Cases
    describe('Edge cases', () => {{
        test('should handle edge case', () => {{
            // Test implementation
        }});
    }});

    // Large Scale Test Cases
    describe('Performance tests', () => {{
        test('should handle large inputs efficiently', () => {{
            // Test implementation
        }});
    }});
}});

{package_comment}

Reply only with code, in a single markdown code block.