I guess it depends on the type of animal and the child's age.
First determine what kind of involvement you would expect from the child: feed the pet daily? Clean the litter? Walk the animal? And then try to give the child a responsibility with the same type of involvement. For example, if you expect the child to feed the animal daily, then have the child perform a daily task. This will give you a good indication as to whether the child can handle the responsibilities that come with having a pet.
Also discuss with the child how they would like to be involved with the animal, and what the child is willing to commit to. If children feel they are involved in the decision, they may put their heart into it more.