Adding JavaScript unit tests