Add unit tests for the `mode/2` predicate directive