fix js unit tests