The Tesla battery pack comes with an 8 year, infinite mile warranty on all cars. Some small amount of capacity loss is considered normal over time, but from what I've read it's generally been pretty minimal.
My own Model S is only about two years old with a bit over 20k miles on it, so I don't know how things will go once the car gets older, but so far it's lost <1% of its range.