Problem: A test labeled "invalid operand type" passes { key: 'value' } as operand.
Since isPlainObject({ key: 'value' }) is true, operand validation passes. The TypeError
actually comes from checkComplexCondition trying to evaluate the string 'value' as a
condition expression. The test passes but tests something different than what it claims.
File: tests/operators/some.test.ts
Fix: Rename the test to clarify what's actually being tested. Add a separate test
with a truly invalid operand (e.g., operand: 42) that exercises operand type checking.
Problem: A test labeled "invalid operand type" passes
{ key: 'value' }as operand.Since
isPlainObject({ key: 'value' })istrue, operand validation passes. The TypeErroractually comes from
checkComplexConditiontrying to evaluate the string'value'as acondition expression. The test passes but tests something different than what it claims.
File:
tests/operators/some.test.tsFix: Rename the test to clarify what's actually being tested. Add a separate test
with a truly invalid operand (e.g.,
operand: 42) that exercises operand type checking.