Adding partial unit testing for template.js