Add unit tests for directives