individualName property

String get individualName

The name of this live test without any group prefixes.

Implementation

String get individualName {
  var group = groups.last;
  if (group.name.isEmpty) return test.name;
  if (!test.name.startsWith(group.name)) return test.name;

  // The test will have the same name as the group for virtual tests created
  // to represent skipping the entire group.
  if (test.name.length == group.name.length) return '';

  return test.name.substring(group.name.length + 1);
}