Added javascript unit test for arrays