Added javascript unit tests for template