Add test for errorIf operation