JS test: extracted test with ast access and directives
JS backend: added tests for labels