Added javascript unit tests