Split `if` helper test into a separate file

cc @rwjblue