Added javascript unit tests.