added json tests for templates and scope