def test_edge_empty(self):
assert func([]) == []
def test_error_raises(self):
with pytest.raises(ValueError):
func(invalid)
## JavaScript (Jest)
```javascript
describe('functionName', () => {
it('should return X when Y', () => {
expect(func(input)).toBe(expected);
});
it('should throw on invalid', () => {
expect(() => func(null)).toThrow(TypeError);
});
});