added unit test and code coverage for Javascript Code Base