Directive tests

Added some basic directive testing that improves the directives.js coverage by ~80% and the overall coverage by ~5%.

This PR is related to #79.