The true test being that the new claim "arises from the same set of operative facts." This means a federal court hearing a federal claim can also hear substantially related state law claims, thereby encouraging efficiency by only having one trial at the federal level rather than one trial in federal court and another in state court. However, if the case is brought as a diversity action (i.e., the basis for federal jurisdiction is that each defendant comes from a state different from each plaintiff), there generally is no supplemental jurisdiction if such claims would destroy complete diversity.
The fundamental test concerns whether the new claim "flows from the same factual basis." This indicates that a federal court handling a federal case can also consider closely related state law claims, improving efficiency by conducting one trial in federal court rather than separate trials in both federal and state courts. However, if the case is filed as a diversity action (where jurisdiction depends on defendants being from different states than plaintiffs), there generally isn't supplemental jurisdiction when such claims might undermine complete diversity.