Giving birth to live young is a possible characteristic of being mammal, but does not define being mammalian. This detail is often either unknown or overlooked when speaking about mammals.
Being a mammal is defined by the production of nutritional milk for their young. Thus the term mammary glands which provides the milk. Cats, dogs, horses are all commonly thought of as being mammals, however, whales, dolphins, and porpoises are part of a group known as marine mammals
In your quote
Most mammals are viviparous, giving birth to live young.
the operative word is most (see below). The phrases
giving birth to live young
giving birth to live offspring
giving live-birth
produce living young
which are live-bearing
can be used interchangeably without loss of understanding.
Giving birth can lead to a live birth or a stillbirth and by law both need to be registered for humans.
An additional distinction needs to be made between being born live and being born from an egg.
Egg laying mammals are called monotremes and egg laying this is due to evolutionary considerations, but they still produce the characteristic nutritional milk for their young.