Extract parse function for directiveCompiler
Split tests into separate files
Add test for directive parser happy paths
Improve directive arg handling