Workflow Name: Unit Test Generator
Category: Development
Description: Generates unit tests for a given code snippet in a specified language.
User Inputs:
* If you implement validation, you would then add specific tests for these error conditions (e.g., `expect(() => multiply('a', 5)).toThrow(TypeError);`).
* **Floating Point Precision:** For critical financial or scientific calculations, be aware of floating-point precision issues in JavaScript (and most programming languages). The `toBeCloseTo` matcher helps with testing, but for actual arithmetic, consider using libraries like `decimal.js` or `big.js` if exact decimal arithmetic is required.
* **Performance Testing:** For functions that might be called frequently or with large inputs, consider adding performance benchmarks to ensure they meet speed requirements.
* **Integration Tests:** While these are unit tests, consider how `multiply` fits into larger components. Integration tests would verify its interaction with other parts of your system.
* **Code Coverage:** Use Jest's built-in code coverage reporting to see which parts of your code are exercised by your tests.
This helps identify untested areas.
multiply function to be more robust.\n