var hasCorrectArea = predicate((rect) => rect.area == rect.length * rect.width, "has correct area"); expect(myRect, hasCorrectArea);