add js unit tests