mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
942 B
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.